From a68a6885d0734f91eb90ba5e1acb327ce816b0fc Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Fri, 11 Mar 2016 10:42:55 +1100 Subject: [PATCH] updated glvisualize --- src/backends/glvisualize.jl | 11 +++++------ src/backends/supported.jl | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/backends/glvisualize.jl b/src/backends/glvisualize.jl index c42848ec..591172a0 100644 --- a/src/backends/glvisualize.jl +++ b/src/backends/glvisualize.jl @@ -6,16 +6,15 @@ immutable GLScreenWrapper window - render end function _create_plot(pkg::GLVisualizePackage; kw...) d = Dict(kw) # TODO: create the window/canvas/context that is the plot within the backend (call it `o`) # TODO: initialize the plot... title, xlabel, bgcolor, etc - w,r=GLVisualize.glscreen() - @async r() - Plot(GLScreenWrapper(w,r), pkg, 0, d, Dict[]) + w=GLVisualize.glscreen() + @async GLVisualize.renderloop(w) + Plot(GLScreenWrapper(w), pkg, 0, d, Dict[]) end @@ -23,8 +22,8 @@ function _add_series(::GLVisualizePackage, plt::Plot; kw...) d = Dict(kw) # TODO: add one series to the underlying package push!(plt.seriesargs, d) - x,y,z=map(Float32,d[:x]), map(Float32,d[:y]), map(Float32,d[:surface].surf) - GLVisualize.view(GLVisualize.visualize(x*ones(y)', ones(x)*y', z, :surface)) + 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 bd78b935..a23615de 100644 --- a/src/backends/supported.jl +++ b/src/backends/supported.jl @@ -510,7 +510,7 @@ supportedArgs(::GLVisualizePackage) = [ # :legend, # :linecolor, # :linestyle, - # :linetype, + :linetype # :linewidth, # :linealpha, # :markershape, @@ -552,7 +552,7 @@ supportedArgs(::GLVisualizePackage) = [ # :nlevels, ] supportedAxes(::GLVisualizePackage) = [:auto, :left] -supportedTypes(::GLVisualizePackage) = [:contour] #, :path, :scatter ,:steppre, :steppost, :sticks, :heatmap, :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]