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 immutable GLScreenWrapper
window window
render
end end
function _create_plot(pkg::GLVisualizePackage; kw...) 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: initialize the plot... title, xlabel, bgcolor, etc
# TODO: this should be moved to the display method? # TODO: this should be moved to the display method?
w,r=GLVisualize.glscreen() w=GLVisualize.glscreen()
@async r() @async GLVisualize.renderloop(w)
o = GLScreenWrapper(w,r) Plot(GLScreenWrapper(w), pkg, 0, d, Dict[])
Plot(o, pkg, 0, d, Dict[])
end end
@ -34,12 +31,9 @@ function _add_series(::GLVisualizePackage, plt::Plot; kw...)
d = Dict(kw) d = Dict(kw)
# TODO: add one series to the underlying package # TODO: add one series to the underlying package
push!(plt.seriesargs, d) push!(plt.seriesargs, d)
# TODO: this should be moved to the display method? # 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) 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(GLVisualize.visualize((x*ones(y)', ones(x)*y', z), :surface),plt.o.window)
GLVisualize.view(viz)
plt plt
end end

View File

@ -658,7 +658,7 @@ supportedArgs(::GLVisualizePackage) = [
# :legend, # :legend,
# :linecolor, # :linecolor,
# :linestyle, # :linestyle,
# :linetype, :linetype
# :linewidth, # :linewidth,
# :linealpha, # :linealpha,
# :markershape, # :markershape,
@ -700,7 +700,7 @@ supportedArgs(::GLVisualizePackage) = [
# :levels, # :levels,
] ]
supportedAxes(::GLVisualizePackage) = [:auto, :left] 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] supportedStyles(::GLVisualizePackage) = [:auto, :solid] #, :dash, :dot, :dashdot, :dashdotdot]
supportedMarkers(::GLVisualizePackage) = [:none, :auto, :ellipse] #, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5] #vcat(_allMarkers, Shape) supportedMarkers(::GLVisualizePackage) = [:none, :auto, :ellipse] #, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5] #vcat(_allMarkers, Shape)
supportedScales(::GLVisualizePackage) = [:identity] #, :log, :log2, :log10, :asinh, :sqrt] supportedScales(::GLVisualizePackage) = [:identity] #, :log, :log2, :log10, :asinh, :sqrt]