diff --git a/src/backends/glvisualize.jl b/src/backends/glvisualize.jl index ec11607c..82d60fcf 100644 --- a/src/backends/glvisualize.jl +++ b/src/backends/glvisualize.jl @@ -13,7 +13,6 @@ end immutable GLScreenWrapper window - render end function _create_plot(pkg::GLVisualizePackage; kw...) @@ -22,11 +21,9 @@ function _create_plot(pkg::GLVisualizePackage; kw...) # TODO: initialize the plot... title, xlabel, bgcolor, etc # TODO: this should be moved to the display method? - w,r=GLVisualize.glscreen() - @async r() - o = GLScreenWrapper(w,r) - - Plot(o, pkg, 0, d, Dict[]) + w=GLVisualize.glscreen() + @async GLVisualize.renderloop(w) + Plot(GLScreenWrapper(w), pkg, 0, d, Dict[]) end @@ -34,12 +31,9 @@ function _add_series(::GLVisualizePackage, plt::Plot; kw...) d = Dict(kw) # TODO: add one series to the underlying package push!(plt.seriesargs, d) - # TODO: this should be moved to the display method? - x, y, z = map(Float32, d[:x]), map(Float32, d[:y]), map(Float32, d[:z].surf) - viz = GLVisualize.visualize(x*ones(y)', ones(x)*y', z, :surface) - GLVisualize.view(viz) - + x,y,z=map(Float32,d[:x]), map(Float32,d[:y]), map(Float32,d[:z].surf) + GLVisualize.view(GLVisualize.visualize((x*ones(y)', ones(x)*y', z), :surface),plt.o.window) plt end diff --git a/src/backends/supported.jl b/src/backends/supported.jl index f9ef2cba..0ba5ff49 100644 --- a/src/backends/supported.jl +++ b/src/backends/supported.jl @@ -658,7 +658,7 @@ supportedArgs(::GLVisualizePackage) = [ # :legend, # :linecolor, # :linestyle, - # :linetype, + :linetype # :linewidth, # :linealpha, # :markershape, @@ -700,7 +700,7 @@ supportedArgs(::GLVisualizePackage) = [ # :levels, ] supportedAxes(::GLVisualizePackage) = [:auto, :left] -supportedTypes(::GLVisualizePackage) = [:contour] #, :path, :scatter ,:steppre, :steppost, :sticks, :hist2d, :hexbin, :hist, :bar, :hline, :vline, :contour] +supportedTypes(::GLVisualizePackage) = [:surface] #, :path, :scatter ,:steppre, :steppost, :sticks, :heatmap, :hexbin, :hist, :bar, :hline, :vline, :contour] supportedStyles(::GLVisualizePackage) = [:auto, :solid] #, :dash, :dot, :dashdot, :dashdotdot] supportedMarkers(::GLVisualizePackage) = [:none, :auto, :ellipse] #, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5] #vcat(_allMarkers, Shape) supportedScales(::GLVisualizePackage) = [:identity] #, :log, :log2, :log10, :asinh, :sqrt]