updated glvisualize

This commit is contained in:
Sheehan Olver 2016-03-11 10:42:55 +11:00
parent 0487d7a058
commit a68a6885d0
2 changed files with 7 additions and 8 deletions

View File

@ -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

View File

@ -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]