Merge pull request #161 from dlfivefifty/dev

Update GLVisualize
This commit is contained in:
Tom Breloff 2016-03-10 19:24:24 -05:00
commit 09d45aa64b
2 changed files with 7 additions and 13 deletions

View File

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

View File

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