changed add_series to accept Series and push to list automatically; default add_series simplifies; removed old supported.jl
This commit is contained in:
parent
bfe04bdd15
commit
a6ce2e691d
@ -54,6 +54,7 @@ subplot!(pkg::AbstractBackend, subplt::Subplot; kw...) = error("subplot!($pkg,
|
|||||||
# don't do anything as a default
|
# don't do anything as a default
|
||||||
_create_backend_figure(plt::Plot) = nothing
|
_create_backend_figure(plt::Plot) = nothing
|
||||||
_before_add_series(plt::Plot) = nothing
|
_before_add_series(plt::Plot) = nothing
|
||||||
|
_add_series(plt::Plot) = nothing
|
||||||
_add_annotations{X,Y,V}(plt::Plot, anns::AVec{Tuple{X,Y,V}}) = nothing
|
_add_annotations{X,Y,V}(plt::Plot, anns::AVec{Tuple{X,Y,V}}) = nothing
|
||||||
_update_plot_pos_size(plt::AbstractPlot, d::KW) = nothing
|
_update_plot_pos_size(plt::AbstractPlot, d::KW) = nothing
|
||||||
|
|
||||||
|
|||||||
@ -154,8 +154,9 @@ function _create_backend_figure(plt::Plot{BokehBackend})
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function _add_series(::BokehBackend, plt::Plot, d::KW)
|
# function _add_series(::BokehBackend, plt::Plot, d::KW)
|
||||||
bdata = Dict{Symbol, Vector}(:x => collect(d[:x]), :y => collect(d[:y]))
|
function _add_series(plt::Plot{BokehBackend}, series::Series)
|
||||||
|
bdata = Dict{Symbol, Vector}(:x => collect(series.d[:x]), :y => collect(series.d[:y]))
|
||||||
|
|
||||||
glyph = Bokeh.Bokehjs.Glyph(
|
glyph = Bokeh.Bokehjs.Glyph(
|
||||||
glyphtype = bokeh_glyph_type(d),
|
glyphtype = bokeh_glyph_type(d),
|
||||||
@ -169,8 +170,8 @@ function _add_series(::BokehBackend, plt::Plot, d::KW)
|
|||||||
legend = nothing # TODO
|
legend = nothing # TODO
|
||||||
push!(plt.o.datacolumns, Bokeh.BokehDataSet(bdata, glyph, legend))
|
push!(plt.o.datacolumns, Bokeh.BokehDataSet(bdata, glyph, legend))
|
||||||
|
|
||||||
push!(plt.seriesargs, d)
|
# push!(plt.seriesargs, d)
|
||||||
plt
|
# plt
|
||||||
end
|
end
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|||||||
@ -580,16 +580,17 @@ end
|
|||||||
|
|
||||||
|
|
||||||
# plot one data series
|
# plot one data series
|
||||||
function _add_series(::GadflyBackend, plt::Plot, d::KW)
|
# function _add_series(::GadflyBackend, plt::Plot, d::KW)
|
||||||
|
function _add_series(plt::Plot{GadflyBackend}, series::Series)
|
||||||
# first clear out the temporary layer
|
# first clear out the temporary layer
|
||||||
gplt = getGadflyContext(plt)
|
gplt = getGadflyContext(plt)
|
||||||
if gplt.layers[1].geom.tag == :remove
|
if gplt.layers[1].geom.tag == :remove
|
||||||
gplt.layers = gplt.layers[2:end]
|
gplt.layers = gplt.layers[2:end]
|
||||||
end
|
end
|
||||||
|
|
||||||
addGadflySeries!(plt, d)
|
addGadflySeries!(plt, series.d)
|
||||||
push!(plt.seriesargs, d)
|
# push!(plt.seriesargs, d)
|
||||||
plt
|
# plt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -95,13 +95,14 @@ function _create_backend_figure(plt::Plot{GLVisualizeBackend})
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function _add_series(::GLVisualizeBackend, plt::Plot, d::KW)
|
# function _add_series(::GLVisualizeBackend, plt::Plot, d::KW)
|
||||||
|
function _add_series(plt::Plot{GLVisualizeBackend}, series::Series)
|
||||||
# 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, series.d[:x]), map(Float32, series.d[:y]), map(Float32, series.d[:z].surf)
|
||||||
GLVisualize.view(GLVisualize.visualize((x*ones(y)', ones(x)*y', z), :surface),plt.o.window)
|
GLVisualize.view(GLVisualize.visualize((x*ones(y)', ones(x)*y', z), :surface), plt.o.window)
|
||||||
plt
|
# plt
|
||||||
end
|
end
|
||||||
|
|
||||||
function _add_annotations{X,Y,V}(plt::Plot{GLVisualizeBackend}, anns::AVec{@compat(Tuple{X,Y,V})})
|
function _add_annotations{X,Y,V}(plt::Plot{GLVisualizeBackend}, anns::AVec{@compat(Tuple{X,Y,V})})
|
||||||
|
|||||||
@ -852,10 +852,10 @@ end
|
|||||||
# Plot(nothing, pkg, 0, d, KW[])
|
# Plot(nothing, pkg, 0, d, KW[])
|
||||||
# end
|
# end
|
||||||
|
|
||||||
function _add_series(::GRBackend, plt::Plot, d::KW)
|
# function _add_series(::GRBackend, plt::Plot, d::KW)
|
||||||
push!(plt.seriesargs, d)
|
# push!(plt.seriesargs, d)
|
||||||
plt
|
# plt
|
||||||
end
|
# end
|
||||||
|
|
||||||
function _add_annotations{X,Y,V}(plt::Plot{GRBackend}, anns::AVec{@compat(Tuple{X,Y,V})})
|
function _add_annotations{X,Y,V}(plt::Plot{GRBackend}, anns::AVec{@compat(Tuple{X,Y,V})})
|
||||||
if haskey(plt.plotargs, :anns)
|
if haskey(plt.plotargs, :anns)
|
||||||
@ -867,8 +867,8 @@ end
|
|||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
function _before_update_plot(plt::Plot{GRBackend})
|
# function _before_update_plot(plt::Plot{GRBackend})
|
||||||
end
|
# end
|
||||||
|
|
||||||
function _update_plot(plt::Plot{GRBackend}, d::KW)
|
function _update_plot(plt::Plot{GRBackend}, d::KW)
|
||||||
for k in (:title, :xlabel, :ylabel)
|
for k in (:title, :xlabel, :ylabel)
|
||||||
@ -876,8 +876,8 @@ function _update_plot(plt::Plot{GRBackend}, d::KW)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function _update_plot_pos_size(plt::AbstractPlot{GRBackend}, d::KW)
|
# function _update_plot_pos_size(plt::AbstractPlot{GRBackend}, d::KW)
|
||||||
end
|
# end
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
@ -894,17 +894,17 @@ end
|
|||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
function _create_subplot(subplt::Subplot{GRBackend}, isbefore::Bool)
|
# function _create_subplot(subplt::Subplot{GRBackend}, isbefore::Bool)
|
||||||
true
|
# true
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
function _expand_limits(lims, plt::Plot{GRBackend}, isx::Bool)
|
# function _expand_limits(lims, plt::Plot{GRBackend}, isx::Bool)
|
||||||
# TODO: call expand limits for each plot data
|
# # TODO: call expand limits for each plot data
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
function _remove_axis(plt::Plot{GRBackend}, isx::Bool)
|
# function _remove_axis(plt::Plot{GRBackend}, isx::Bool)
|
||||||
# TODO: if plot is inner subplot, might need to remove ticks or axis labels
|
# # TODO: if plot is inner subplot, might need to remove ticks or axis labels
|
||||||
end
|
# end
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@ -41,11 +41,15 @@ function _create_backend_figure(plt::Plot{ImmerseBackend})
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# plot one data series
|
# # plot one data series
|
||||||
function _add_series(::ImmerseBackend, plt::Plot, d::KW)
|
# function _add_series(::ImmerseBackend, plt::Plot, d::KW)
|
||||||
addGadflySeries!(plt, d)
|
# addGadflySeries!(plt, d)
|
||||||
push!(plt.seriesargs, d)
|
# push!(plt.seriesargs, d)
|
||||||
plt
|
# plt
|
||||||
|
# end
|
||||||
|
|
||||||
|
function _add_series(plt::Plot{ImmerseBackend}, series::Series)
|
||||||
|
addGadflySeries!(plt, series.d)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -236,11 +236,11 @@ end
|
|||||||
# end
|
# end
|
||||||
|
|
||||||
|
|
||||||
function _add_series(::PGFPlotsBackend, plt::Plot, d::KW)
|
# function _add_series(::PGFPlotsBackend, plt::Plot, d::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)
|
||||||
plt
|
# plt
|
||||||
end
|
# end
|
||||||
|
|
||||||
function _add_annotations{X,Y,V}(plt::Plot{PGFPlotsBackend}, anns::AVec{@compat(Tuple{X,Y,V})})
|
function _add_annotations{X,Y,V}(plt::Plot{PGFPlotsBackend}, anns::AVec{@compat(Tuple{X,Y,V})})
|
||||||
# set or add to the annotation_list
|
# set or add to the annotation_list
|
||||||
@ -285,13 +285,13 @@ end
|
|||||||
# true
|
# true
|
||||||
# end
|
# end
|
||||||
|
|
||||||
function _expand_limits(lims, plt::Plot{PGFPlotsBackend}, isx::Bool)
|
# function _expand_limits(lims, plt::Plot{PGFPlotsBackend}, isx::Bool)
|
||||||
# TODO: call expand limits for each plot data
|
# # TODO: call expand limits for each plot data
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
function _remove_axis(plt::Plot{PGFPlotsBackend}, isx::Bool)
|
# function _remove_axis(plt::Plot{PGFPlotsBackend}, isx::Bool)
|
||||||
# TODO: if plot is inner subplot, might need to remove ticks or axis labels
|
# # TODO: if plot is inner subplot, might need to remove ticks or axis labels
|
||||||
end
|
# end
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@ -91,11 +91,11 @@ end
|
|||||||
# end
|
# end
|
||||||
|
|
||||||
|
|
||||||
function _add_series(::PlotlyBackend, plt::Plot, d::KW)
|
# function _add_series(::PlotlyBackend, plt::Plot, d::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)
|
||||||
plt
|
# plt
|
||||||
end
|
# end
|
||||||
|
|
||||||
function _add_annotations{X,Y,V}(plt::Plot{PlotlyBackend}, anns::AVec{@compat(Tuple{X,Y,V})})
|
function _add_annotations{X,Y,V}(plt::Plot{PlotlyBackend}, anns::AVec{@compat(Tuple{X,Y,V})})
|
||||||
# set or add to the annotation_list
|
# set or add to the annotation_list
|
||||||
|
|||||||
@ -113,7 +113,8 @@ function _create_backend_figure(plt::Plot{PlotlyJSBackend})
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function _add_series(::PlotlyJSBackend, plt::Plot, d::KW)
|
function _add_series(plt::Plot{PlotlyJSBackend}, series::Series)
|
||||||
|
d = series.d
|
||||||
syncplot = plt.o
|
syncplot = plt.o
|
||||||
|
|
||||||
# add to the data array
|
# add to the data array
|
||||||
@ -122,8 +123,8 @@ function _add_series(::PlotlyJSBackend, plt::Plot, d::KW)
|
|||||||
gt = PlotlyJS.GenericTrace(typ; pdict...)
|
gt = PlotlyJS.GenericTrace(typ; pdict...)
|
||||||
PlotlyJS.addtraces!(syncplot, gt)
|
PlotlyJS.addtraces!(syncplot, gt)
|
||||||
|
|
||||||
push!(plt.seriesargs, d)
|
# push!(plt.seriesargs, d)
|
||||||
plt
|
# plt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -364,7 +364,9 @@ pylinecolormap(d::KW) = getPyPlotColorMap(d[:linecolor], d[:linealpha])
|
|||||||
pymarkercolormap(d::KW) = getPyPlotColorMap(d[:markercolor], d[:markeralpha])
|
pymarkercolormap(d::KW) = getPyPlotColorMap(d[:markercolor], d[:markeralpha])
|
||||||
pyfillcolormap(d::KW) = getPyPlotColorMap(d[:fillcolor], d[:fillalpha])
|
pyfillcolormap(d::KW) = getPyPlotColorMap(d[:fillcolor], d[:fillalpha])
|
||||||
|
|
||||||
function _add_series(pkg::PyPlotBackend, plt::Plot, d::KW)
|
# function _add_series(pkg::PyPlotBackend, plt::Plot, d::KW)
|
||||||
|
function _add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||||
|
d = series.d
|
||||||
st = d[:seriestype]
|
st = d[:seriestype]
|
||||||
if !(st in supportedTypes(pkg))
|
if !(st in supportedTypes(pkg))
|
||||||
error("seriestype $(st) is unsupported in PyPlot. Choose from: $(supportedTypes(pkg))")
|
error("seriestype $(st) is unsupported in PyPlot. Choose from: $(supportedTypes(pkg))")
|
||||||
@ -758,8 +760,8 @@ function _add_series(pkg::PyPlotBackend, plt::Plot, d::KW)
|
|||||||
push!(handles, handle)
|
push!(handles, handle)
|
||||||
end
|
end
|
||||||
|
|
||||||
push!(plt.seriesargs, d)
|
# push!(plt.seriesargs, d)
|
||||||
plt
|
# plt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -137,13 +137,14 @@ function _create_backend_figure(plt::Plot{QwtBackend})
|
|||||||
# plt
|
# plt
|
||||||
end
|
end
|
||||||
|
|
||||||
function _add_series(::QwtBackend, plt::Plot, d::KW)
|
# function _add_series(::QwtBackend, plt::Plot, d::KW)
|
||||||
d = adjustQwtKeywords(plt, false; d...)
|
function _add_series(plt::Plot{QwtBackend}, series::Series)
|
||||||
|
d = adjustQwtKeywords(plt, false; series.d...)
|
||||||
fixcolors(d)
|
fixcolors(d)
|
||||||
dumpdict(d,"\n\n!!! plot!")
|
dumpdict(d,"\n\n!!! plot!")
|
||||||
Qwt.oplot(plt.o; d...)
|
Qwt.oplot(plt.o; d...)
|
||||||
push!(plt.seriesargs, d)
|
# push!(plt.seriesargs, d)
|
||||||
plt
|
# plt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,698 +0,0 @@
|
|||||||
#
|
|
||||||
# supportedAxes(::AbstractBackend) = [:left]
|
|
||||||
# supportedTypes(::AbstractBackend) = []
|
|
||||||
# supportedStyles(::AbstractBackend) = [:solid]
|
|
||||||
# supportedMarkers(::AbstractBackend) = [:none]
|
|
||||||
# supportedScales(::AbstractBackend) = [:identity]
|
|
||||||
# subplotSupported(::AbstractBackend) = false
|
|
||||||
# stringsSupported(::AbstractBackend) = false
|
|
||||||
#
|
|
||||||
# supportedAxes() = supportedAxes(backend())
|
|
||||||
# supportedTypes() = supportedTypes(backend())
|
|
||||||
# supportedStyles() = supportedStyles(backend())
|
|
||||||
# supportedMarkers() = supportedMarkers(backend())
|
|
||||||
# supportedScales() = supportedScales(backend())
|
|
||||||
# subplotSupported() = subplotSupported(backend())
|
|
||||||
# stringsSupported() = stringsSupported(backend())
|
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# supportedArgs(::GadflyBackend) = [
|
|
||||||
# :annotation,
|
|
||||||
# :background_color, :foreground_color, :color_palette,
|
|
||||||
# :group,
|
|
||||||
# :label,
|
|
||||||
# :seriestype,
|
|
||||||
# :seriescolor, :seriesalpha,
|
|
||||||
# :linecolor, :linestyle, :linewidth, :linealpha,
|
|
||||||
# :markershape, :markercolor, :markersize, :markeralpha,
|
|
||||||
# :markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
|
||||||
# :fillrange, :fillcolor, :fillalpha,
|
|
||||||
# :bins,
|
|
||||||
# :n, :nc, :nr, :layout,
|
|
||||||
# :smooth,
|
|
||||||
# :title, :windowtitle, :show, :size,
|
|
||||||
# :x, :xlabel, :xlims, :xticks, :xscale, :xflip,
|
|
||||||
# :y, :ylabel, :ylims, :yticks, :yscale, :yflip,
|
|
||||||
# # :z, :zlabel, :zlims, :zticks, :zscale, :zflip,
|
|
||||||
# :z,
|
|
||||||
# :tickfont, :guidefont, :legendfont,
|
|
||||||
# :grid, :legend, :colorbar,
|
|
||||||
# :marker_z, :levels,
|
|
||||||
# :xerror, :yerror,
|
|
||||||
# :ribbon, :quiver,
|
|
||||||
# :orientation,
|
|
||||||
# ]
|
|
||||||
# supportedAxes(::GadflyBackend) = [:auto, :left]
|
|
||||||
# supportedTypes(::GadflyBackend) = [
|
|
||||||
# :none, :line, :path, :steppre, :steppost, :sticks,
|
|
||||||
# :scatter, :hist2d, :hexbin, :hist,
|
|
||||||
# :bar, :box, :violin, :quiver,
|
|
||||||
# :hline, :vline, :contour, :shape
|
|
||||||
# ]
|
|
||||||
# supportedStyles(::GadflyBackend) = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
|
||||||
# supportedMarkers(::GadflyBackend) = vcat(_allMarkers, Shape)
|
|
||||||
# supportedScales(::GadflyBackend) = [:identity, :ln, :log2, :log10, :asinh, :sqrt]
|
|
||||||
# subplotSupported(::GadflyBackend) = true
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
# supportedArgs(::ImmerseBackend) = supportedArgs(GadflyBackend())
|
|
||||||
# supportedAxes(::ImmerseBackend) = supportedAxes(GadflyBackend())
|
|
||||||
# supportedTypes(::ImmerseBackend) = supportedTypes(GadflyBackend())
|
|
||||||
# supportedStyles(::ImmerseBackend) = supportedStyles(GadflyBackend())
|
|
||||||
# supportedMarkers(::ImmerseBackend) = supportedMarkers(GadflyBackend())
|
|
||||||
# supportedScales(::ImmerseBackend) = supportedScales(GadflyBackend())
|
|
||||||
# subplotSupported(::ImmerseBackend) = true
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# supportedArgs(::PyPlotBackend) = [
|
|
||||||
# :annotation,
|
|
||||||
# :background_color, :foreground_color, :color_palette,
|
|
||||||
# :background_color_legend, :background_color_inside, :background_color_outside,
|
|
||||||
# :foreground_color_legend, :foreground_color_grid, :foreground_color_axis,
|
|
||||||
# :foreground_color_text, :foreground_color_border,
|
|
||||||
# :group,
|
|
||||||
# :label,
|
|
||||||
# :seriestype,
|
|
||||||
# :seriescolor, :seriesalpha,
|
|
||||||
# :linecolor, :linestyle, :linewidth, :linealpha,
|
|
||||||
# :markershape, :markercolor, :markersize, :markeralpha,
|
|
||||||
# :markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
|
||||||
# :fillrange, :fillcolor, :fillalpha,
|
|
||||||
# :bins,
|
|
||||||
# :n, :nc, :nr, :layout,
|
|
||||||
# :smooth,
|
|
||||||
# :title, :windowtitle, :show, :size,
|
|
||||||
# :x, :xlabel, :xlims, :xticks, :xscale, :xflip,
|
|
||||||
# :y, :ylabel, :ylims, :yticks, :yscale, :yflip,
|
|
||||||
# :axis, :yrightlabel,
|
|
||||||
# :z, :zlabel, :zlims, :zticks, :zscale, :zflip,
|
|
||||||
# :z,
|
|
||||||
# :tickfont, :guidefont, :legendfont,
|
|
||||||
# :grid, :legend, :colorbar,
|
|
||||||
# :marker_z, :levels,
|
|
||||||
# :xerror, :yerror,
|
|
||||||
# :ribbon, :quiver,
|
|
||||||
# :orientation,
|
|
||||||
# :overwrite_figure,
|
|
||||||
# :polar,
|
|
||||||
# :normalize, :weights, :contours, :aspect_ratio
|
|
||||||
# ]
|
|
||||||
# supportedAxes(::PyPlotBackend) = _allAxes
|
|
||||||
# supportedTypes(::PyPlotBackend) = [
|
|
||||||
# :none, :line, :path, :steppre, :steppost, :shape,
|
|
||||||
# :scatter, :hist2d, :hexbin, :hist, :density,
|
|
||||||
# :bar, :sticks, :box, :violin, :quiver,
|
|
||||||
# :hline, :vline, :heatmap, :pie,
|
|
||||||
# :contour, :contour3d, :path3d, :scatter3d, :surface, :wireframe
|
|
||||||
# ]
|
|
||||||
# supportedStyles(::PyPlotBackend) = [:auto, :solid, :dash, :dot, :dashdot]
|
|
||||||
# supportedMarkers(::PyPlotBackend) = vcat(_allMarkers, Shape)
|
|
||||||
# supportedScales(::PyPlotBackend) = [:identity, :ln, :log2, :log10]
|
|
||||||
# subplotSupported(::PyPlotBackend) = true
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# supportedArgs(::GRBackend) = [
|
|
||||||
# :annotation,
|
|
||||||
# :background_color, :foreground_color, :color_palette,
|
|
||||||
# :group,
|
|
||||||
# :label,
|
|
||||||
# :seriestype,
|
|
||||||
# :seriescolor, :seriesalpha,
|
|
||||||
# :linecolor, :linestyle, :linewidth, :linealpha,
|
|
||||||
# :markershape, :markercolor, :markersize, :markeralpha,
|
|
||||||
# :markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
|
||||||
# :fillrange, :fillcolor, :fillalpha,
|
|
||||||
# :bins,
|
|
||||||
# :n, :nc, :nr, :layout,
|
|
||||||
# :smooth,
|
|
||||||
# :title, :windowtitle, :show, :size,
|
|
||||||
# :x, :xlabel, :xlims, :xticks, :xscale, :xflip,
|
|
||||||
# :y, :ylabel, :ylims, :yticks, :yscale, :yflip,
|
|
||||||
# :axis, :yrightlabel,
|
|
||||||
# :z, :zlabel, :zlims, :zticks, :zscale, :zflip,
|
|
||||||
# :z,
|
|
||||||
# :tickfont, :guidefont, :legendfont,
|
|
||||||
# :grid, :legend, :colorbar,
|
|
||||||
# :marker_z, :levels,
|
|
||||||
# :xerror, :yerror,
|
|
||||||
# :ribbon, :quiver,
|
|
||||||
# :orientation,
|
|
||||||
# :overwrite_figure,
|
|
||||||
# :polar,
|
|
||||||
# ]
|
|
||||||
# supportedAxes(::GRBackend) = _allAxes
|
|
||||||
# supportedTypes(::GRBackend) = [:none, :line, :path, :steppre, :steppost, :sticks,
|
|
||||||
# :scatter, :hist2d, :hexbin, :hist, :density, :bar,
|
|
||||||
# :hline, :vline, :contour, :heatmap, :path3d, :scatter3d, :surface,
|
|
||||||
# :wireframe, :ohlc, :pie]
|
|
||||||
# supportedStyles(::GRBackend) = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
|
||||||
# supportedMarkers(::GRBackend) = vcat(_allMarkers, Shape)
|
|
||||||
# supportedScales(::GRBackend) = [:identity, :log10]
|
|
||||||
# subplotSupported(::GRBackend) = true
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# supportedArgs(::QwtBackend) = [
|
|
||||||
# :annotation,
|
|
||||||
# :axis,
|
|
||||||
# :background_color,
|
|
||||||
# :linecolor,
|
|
||||||
# :color_palette,
|
|
||||||
# :fillrange,
|
|
||||||
# :fillcolor,
|
|
||||||
# :foreground_color,
|
|
||||||
# :group,
|
|
||||||
# :label,
|
|
||||||
# :layout,
|
|
||||||
# :legend,
|
|
||||||
# :seriescolor, :seriesalpha,
|
|
||||||
# :linestyle,
|
|
||||||
# :seriestype,
|
|
||||||
# :linewidth,
|
|
||||||
# :markershape,
|
|
||||||
# :markercolor,
|
|
||||||
# :markersize,
|
|
||||||
# :n,
|
|
||||||
# :bins,
|
|
||||||
# :nc,
|
|
||||||
# :nr,
|
|
||||||
# :pos,
|
|
||||||
# :smooth,
|
|
||||||
# :show,
|
|
||||||
# :size,
|
|
||||||
# :title,
|
|
||||||
# :windowtitle,
|
|
||||||
# :x,
|
|
||||||
# :xlabel,
|
|
||||||
# :xlims,
|
|
||||||
# :xticks,
|
|
||||||
# :y,
|
|
||||||
# :ylabel,
|
|
||||||
# :ylims,
|
|
||||||
# :yrightlabel,
|
|
||||||
# :yticks,
|
|
||||||
# :xscale,
|
|
||||||
# :yscale,
|
|
||||||
# ]
|
|
||||||
# supportedTypes(::QwtBackend) = [:none, :line, :path, :steppre, :steppost, :sticks, :scatter, :hist2d, :hexbin, :hist, :bar, :hline, :vline]
|
|
||||||
# supportedMarkers(::QwtBackend) = [:none, :auto, :rect, :ellipse, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5, :star8, :hexagon]
|
|
||||||
# supportedScales(::QwtBackend) = [:identity, :log10]
|
|
||||||
# subplotSupported(::QwtBackend) = true
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
# supportedArgs(::UnicodePlotsBackend) = [
|
|
||||||
# # :annotation,
|
|
||||||
# # :args,
|
|
||||||
# # :axis,
|
|
||||||
# # :background_color,
|
|
||||||
# # :linecolor,
|
|
||||||
# # :fill,
|
|
||||||
# # :foreground_color,
|
|
||||||
# :group,
|
|
||||||
# # :heatmap_c,
|
|
||||||
# # :kwargs,
|
|
||||||
# :label,
|
|
||||||
# # :layout,
|
|
||||||
# :legend,
|
|
||||||
# :seriescolor, :seriesalpha,
|
|
||||||
# :linestyle,
|
|
||||||
# :seriestype,
|
|
||||||
# # :linewidth,
|
|
||||||
# :markershape,
|
|
||||||
# # :markercolor,
|
|
||||||
# # :markersize,
|
|
||||||
# # :markerstrokewidth,
|
|
||||||
# # :markerstrokecolor,
|
|
||||||
# # :markerstrokestyle,
|
|
||||||
# # :n,
|
|
||||||
# :bins,
|
|
||||||
# # :nc,
|
|
||||||
# # :nr,
|
|
||||||
# # :pos,
|
|
||||||
# # :reg,
|
|
||||||
# # :ribbon,
|
|
||||||
# :show,
|
|
||||||
# :size,
|
|
||||||
# :title,
|
|
||||||
# :windowtitle,
|
|
||||||
# :x,
|
|
||||||
# :xlabel,
|
|
||||||
# :xlims,
|
|
||||||
# # :xticks,
|
|
||||||
# :y,
|
|
||||||
# :ylabel,
|
|
||||||
# :ylims,
|
|
||||||
# # :yrightlabel,
|
|
||||||
# # :yticks,
|
|
||||||
# # :xscale,
|
|
||||||
# # :yscale,
|
|
||||||
# # :xflip,
|
|
||||||
# # :yflip,
|
|
||||||
# # :z,
|
|
||||||
# ]
|
|
||||||
# supportedAxes(::UnicodePlotsBackend) = [:auto, :left]
|
|
||||||
# supportedTypes(::UnicodePlotsBackend) = [:none, :line, :path, :steppre, :steppost, :sticks, :scatter, :hist2d, :hexbin, :hist, :bar, :hline, :vline]
|
|
||||||
# supportedStyles(::UnicodePlotsBackend) = [:auto, :solid]
|
|
||||||
# supportedMarkers(::UnicodePlotsBackend) = [:none, :auto, :ellipse]
|
|
||||||
# supportedScales(::UnicodePlotsBackend) = [:identity]
|
|
||||||
# subplotSupported(::UnicodePlotsBackend) = true
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
# supportedArgs(::WinstonBackend) = [
|
|
||||||
# :annotation,
|
|
||||||
# # :args,
|
|
||||||
# # :axis,
|
|
||||||
# # :background_color,
|
|
||||||
# :linecolor,
|
|
||||||
# :color_palette,
|
|
||||||
# :fillrange,
|
|
||||||
# :fillcolor,
|
|
||||||
# # :foreground_color,
|
|
||||||
# :group,
|
|
||||||
# # :heatmap_c,
|
|
||||||
# # :kwargs,
|
|
||||||
# :label,
|
|
||||||
# # :layout,
|
|
||||||
# :legend,
|
|
||||||
# :seriescolor, :seriesalpha,
|
|
||||||
# :linestyle,
|
|
||||||
# :seriestype,
|
|
||||||
# :linewidth,
|
|
||||||
# :markershape,
|
|
||||||
# :markercolor,
|
|
||||||
# :markersize,
|
|
||||||
# # :markerstrokewidth,
|
|
||||||
# # :markerstrokecolor,
|
|
||||||
# # :markerstrokestyle,
|
|
||||||
# # :n,
|
|
||||||
# :bins,
|
|
||||||
# # :nc,
|
|
||||||
# # :nr,
|
|
||||||
# # :pos,
|
|
||||||
# :smooth,
|
|
||||||
# # :ribbon,
|
|
||||||
# :show,
|
|
||||||
# :size,
|
|
||||||
# :title,
|
|
||||||
# :windowtitle,
|
|
||||||
# :x,
|
|
||||||
# :xlabel,
|
|
||||||
# :xlims,
|
|
||||||
# # :xticks,
|
|
||||||
# :y,
|
|
||||||
# :ylabel,
|
|
||||||
# :ylims,
|
|
||||||
# # :yrightlabel,
|
|
||||||
# # :yticks,
|
|
||||||
# :xscale,
|
|
||||||
# :yscale,
|
|
||||||
# # :xflip,
|
|
||||||
# # :yflip,
|
|
||||||
# # :z,
|
|
||||||
# ]
|
|
||||||
# supportedAxes(::WinstonBackend) = [:auto, :left]
|
|
||||||
# supportedTypes(::WinstonBackend) = [:none, :line, :path, :sticks, :scatter, :hist, :bar]
|
|
||||||
# supportedStyles(::WinstonBackend) = [:auto, :solid, :dash, :dot, :dashdot]
|
|
||||||
# supportedMarkers(::WinstonBackend) = [:none, :auto, :rect, :ellipse, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5]
|
|
||||||
# supportedScales(::WinstonBackend) = [:identity, :log10]
|
|
||||||
# subplotSupported(::WinstonBackend) = false
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# supportedArgs(::BokehBackend) = [
|
|
||||||
# # :annotation,
|
|
||||||
# # :axis,
|
|
||||||
# # :background_color,
|
|
||||||
# :linecolor,
|
|
||||||
# # :color_palette,
|
|
||||||
# # :fillrange,
|
|
||||||
# # :fillcolor,
|
|
||||||
# # :fillalpha,
|
|
||||||
# # :foreground_color,
|
|
||||||
# :group,
|
|
||||||
# # :label,
|
|
||||||
# # :layout,
|
|
||||||
# # :legend,
|
|
||||||
# :seriescolor, :seriesalpha,
|
|
||||||
# :linestyle,
|
|
||||||
# :seriestype,
|
|
||||||
# :linewidth,
|
|
||||||
# # :linealpha,
|
|
||||||
# :markershape,
|
|
||||||
# :markercolor,
|
|
||||||
# :markersize,
|
|
||||||
# # :markeralpha,
|
|
||||||
# # :markerstrokewidth,
|
|
||||||
# # :markerstrokecolor,
|
|
||||||
# # :markerstrokestyle,
|
|
||||||
# # :n,
|
|
||||||
# # :bins,
|
|
||||||
# # :nc,
|
|
||||||
# # :nr,
|
|
||||||
# # :pos,
|
|
||||||
# # :smooth,
|
|
||||||
# # :show,
|
|
||||||
# :size,
|
|
||||||
# :title,
|
|
||||||
# # :windowtitle,
|
|
||||||
# :x,
|
|
||||||
# # :xlabel,
|
|
||||||
# # :xlims,
|
|
||||||
# # :xticks,
|
|
||||||
# :y,
|
|
||||||
# # :ylabel,
|
|
||||||
# # :ylims,
|
|
||||||
# # :yrightlabel,
|
|
||||||
# # :yticks,
|
|
||||||
# # :xscale,
|
|
||||||
# # :yscale,
|
|
||||||
# # :xflip,
|
|
||||||
# # :yflip,
|
|
||||||
# # :z,
|
|
||||||
# # :tickfont,
|
|
||||||
# # :guidefont,
|
|
||||||
# # :legendfont,
|
|
||||||
# # :grid,
|
|
||||||
# # :surface,
|
|
||||||
# # :levels,
|
|
||||||
# ]
|
|
||||||
# supportedAxes(::BokehBackend) = [:auto, :left]
|
|
||||||
# supportedTypes(::BokehBackend) = [:none, :path, :scatter] #,:steppre, :steppost, :sticks, :hist2d, :hexbin, :hist, :bar, :hline, :vline, :contour]
|
|
||||||
# supportedStyles(::BokehBackend) = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
|
||||||
# supportedMarkers(::BokehBackend) = [:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5] #vcat(_allMarkers, Shape)
|
|
||||||
# supportedScales(::BokehBackend) = [:identity, :ln] #, :ln, :log2, :log10, :asinh, :sqrt]
|
|
||||||
# subplotSupported(::BokehBackend) = false
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# supportedArgs(::PlotlyBackend) = [
|
|
||||||
# :annotation,
|
|
||||||
# # :axis,
|
|
||||||
# :background_color,
|
|
||||||
# :color_palette,
|
|
||||||
# :fillrange,
|
|
||||||
# :fillcolor,
|
|
||||||
# :fillalpha,
|
|
||||||
# :foreground_color,
|
|
||||||
# :group,
|
|
||||||
# :label,
|
|
||||||
# :layout,
|
|
||||||
# :legend,
|
|
||||||
# :seriescolor, :seriesalpha,
|
|
||||||
# :linecolor,
|
|
||||||
# :linestyle,
|
|
||||||
# :seriestype,
|
|
||||||
# :linewidth,
|
|
||||||
# :linealpha,
|
|
||||||
# :markershape,
|
|
||||||
# :markercolor,
|
|
||||||
# :markersize,
|
|
||||||
# :markeralpha,
|
|
||||||
# :markerstrokewidth,
|
|
||||||
# :markerstrokecolor,
|
|
||||||
# :markerstrokestyle,
|
|
||||||
# :n,
|
|
||||||
# :bins,
|
|
||||||
# :nc,
|
|
||||||
# :nr,
|
|
||||||
# # :pos,
|
|
||||||
# # :smooth,
|
|
||||||
# :show,
|
|
||||||
# :size,
|
|
||||||
# :title,
|
|
||||||
# :windowtitle,
|
|
||||||
# :x,
|
|
||||||
# :xlabel,
|
|
||||||
# :xlims,
|
|
||||||
# :xticks,
|
|
||||||
# :y,
|
|
||||||
# :ylabel,
|
|
||||||
# :ylims,
|
|
||||||
# # :yrightlabel,
|
|
||||||
# :yticks,
|
|
||||||
# :xscale,
|
|
||||||
# :yscale,
|
|
||||||
# :xflip,
|
|
||||||
# :yflip,
|
|
||||||
# :z,
|
|
||||||
# :marker_z,
|
|
||||||
# :tickfont,
|
|
||||||
# :guidefont,
|
|
||||||
# :legendfont,
|
|
||||||
# :grid,
|
|
||||||
# :levels,
|
|
||||||
# :xerror,
|
|
||||||
# :yerror,
|
|
||||||
# :ribbon,
|
|
||||||
# :quiver,
|
|
||||||
# :orientation,
|
|
||||||
# :polar,
|
|
||||||
# ]
|
|
||||||
# supportedAxes(::PlotlyBackend) = [:auto, :left]
|
|
||||||
# supportedTypes(::PlotlyBackend) = [:none, :line, :path, :scatter, :steppre, :steppost,
|
|
||||||
# :hist2d, :hist, :density, :bar, :contour, :surface, :path3d, :scatter3d,
|
|
||||||
# :pie, :heatmap] #,, :sticks, :hexbin, :hline, :vline]
|
|
||||||
# supportedStyles(::PlotlyBackend) = [:auto, :solid, :dash, :dot, :dashdot]
|
|
||||||
# supportedMarkers(::PlotlyBackend) = [:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross,
|
|
||||||
# :pentagon, :hexagon, :octagon, :vline, :hline] #vcat(_allMarkers, Shape)
|
|
||||||
# supportedScales(::PlotlyBackend) = [:identity, :log10] #, :ln, :log2, :log10, :asinh, :sqrt]
|
|
||||||
# subplotSupported(::PlotlyBackend) = true
|
|
||||||
# stringsSupported(::PlotlyBackend) = true
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# supportedArgs(::PlotlyJSBackend) = [
|
|
||||||
# :annotation,
|
|
||||||
# # :axis,
|
|
||||||
# :background_color,
|
|
||||||
# :color_palette,
|
|
||||||
# :fillrange,
|
|
||||||
# :fillcolor,
|
|
||||||
# :fillalpha,
|
|
||||||
# :foreground_color,
|
|
||||||
# :group,
|
|
||||||
# :label,
|
|
||||||
# :layout,
|
|
||||||
# :legend,
|
|
||||||
# :seriescolor, :seriesalpha,
|
|
||||||
# :linecolor,
|
|
||||||
# :linestyle,
|
|
||||||
# :seriestype,
|
|
||||||
# :linewidth,
|
|
||||||
# :linealpha,
|
|
||||||
# :markershape,
|
|
||||||
# :markercolor,
|
|
||||||
# :markersize,
|
|
||||||
# :markeralpha,
|
|
||||||
# :markerstrokewidth,
|
|
||||||
# :markerstrokecolor,
|
|
||||||
# :markerstrokestyle,
|
|
||||||
# :n,
|
|
||||||
# :bins,
|
|
||||||
# :nc,
|
|
||||||
# :nr,
|
|
||||||
# # :pos,
|
|
||||||
# # :smooth,
|
|
||||||
# :show,
|
|
||||||
# :size,
|
|
||||||
# :title,
|
|
||||||
# :windowtitle,
|
|
||||||
# :x,
|
|
||||||
# :xlabel,
|
|
||||||
# :xlims,
|
|
||||||
# :xticks,
|
|
||||||
# :y,
|
|
||||||
# :ylabel,
|
|
||||||
# :ylims,
|
|
||||||
# # :yrightlabel,
|
|
||||||
# :yticks,
|
|
||||||
# :xscale,
|
|
||||||
# :yscale,
|
|
||||||
# :xflip,
|
|
||||||
# :yflip,
|
|
||||||
# :z,
|
|
||||||
# :marker_z,
|
|
||||||
# :tickfont,
|
|
||||||
# :guidefont,
|
|
||||||
# :legendfont,
|
|
||||||
# :grid,
|
|
||||||
# :levels,
|
|
||||||
# :xerror,
|
|
||||||
# :yerror,
|
|
||||||
# :ribbon,
|
|
||||||
# :quiver,
|
|
||||||
# :orientation,
|
|
||||||
# :polar,
|
|
||||||
# ]
|
|
||||||
# supportedAxes(::PlotlyJSBackend) = [:auto, :left]
|
|
||||||
# supportedTypes(::PlotlyJSBackend) = [:none, :line, :path, :scatter, :steppre, :steppost,
|
|
||||||
# :hist2d, :hist, :density, :bar, :contour, :surface, :path3d, :scatter3d,
|
|
||||||
# :pie, :heatmap] #,, :sticks, :hexbin, :hline, :vline]
|
|
||||||
# supportedStyles(::PlotlyJSBackend) = [:auto, :solid, :dash, :dot, :dashdot]
|
|
||||||
# supportedMarkers(::PlotlyJSBackend) = [:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross,
|
|
||||||
# :pentagon, :hexagon, :octagon, :vline, :hline] #vcat(_allMarkers, Shape)
|
|
||||||
# supportedScales(::PlotlyJSBackend) = [:identity, :log10] #, :ln, :log2, :log10, :asinh, :sqrt]
|
|
||||||
# subplotSupported(::PlotlyJSBackend) = true
|
|
||||||
# stringsSupported(::PlotlyJSBackend) = true
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# supportedArgs(::GLVisualizeBackend) = [
|
|
||||||
# # :annotation,
|
|
||||||
# # :axis,
|
|
||||||
# # :background_color,
|
|
||||||
# # :color_palette,
|
|
||||||
# # :fillrange,
|
|
||||||
# # :fillcolor,
|
|
||||||
# # :fillalpha,
|
|
||||||
# # :foreground_color,
|
|
||||||
# # :group,
|
|
||||||
# # :label,
|
|
||||||
# # :layout,
|
|
||||||
# # :legend,
|
|
||||||
# # :linecolor,
|
|
||||||
# # :linestyle,
|
|
||||||
# :seriestype
|
|
||||||
# # :seriescolor, :seriesalpha,
|
|
||||||
# # :linewidth,
|
|
||||||
# # :linealpha,
|
|
||||||
# # :markershape,
|
|
||||||
# # :markercolor,
|
|
||||||
# # :markersize,
|
|
||||||
# # :markeralpha,
|
|
||||||
# # :markerstrokewidth,
|
|
||||||
# # :markerstrokecolor,
|
|
||||||
# # :markerstrokestyle,
|
|
||||||
# # :n,
|
|
||||||
# # :bins,
|
|
||||||
# # :nc,
|
|
||||||
# # :nr,
|
|
||||||
# # :pos,
|
|
||||||
# # :smooth,
|
|
||||||
# # :show,
|
|
||||||
# # :size,
|
|
||||||
# # :title,
|
|
||||||
# # :windowtitle,
|
|
||||||
# # :x,
|
|
||||||
# # :xlabel,
|
|
||||||
# # :xlims,
|
|
||||||
# # :xticks,
|
|
||||||
# # :y,
|
|
||||||
# # :ylabel,
|
|
||||||
# # :ylims,
|
|
||||||
# # :yrightlabel,
|
|
||||||
# # :yticks,
|
|
||||||
# # :xscale,
|
|
||||||
# # :yscale,
|
|
||||||
# # :xflip,
|
|
||||||
# # :yflip,
|
|
||||||
# # :z,
|
|
||||||
# # :tickfont,
|
|
||||||
# # :guidefont,
|
|
||||||
# # :legendfont,
|
|
||||||
# # :grid,
|
|
||||||
# # :surface
|
|
||||||
# # :levels,
|
|
||||||
# ]
|
|
||||||
# supportedAxes(::GLVisualizeBackend) = [:auto, :left]
|
|
||||||
# supportedTypes(::GLVisualizeBackend) = [:surface] #, :path, :scatter ,:steppre, :steppost, :sticks, :heatmap, :hexbin, :hist, :bar, :hline, :vline, :contour]
|
|
||||||
# supportedStyles(::GLVisualizeBackend) = [:auto, :solid] #, :dash, :dot, :dashdot, :dashdotdot]
|
|
||||||
# supportedMarkers(::GLVisualizeBackend) = [:none, :auto, :ellipse] #, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5] #vcat(_allMarkers, Shape)
|
|
||||||
# supportedScales(::GLVisualizeBackend) = [:identity] #, :log, :log2, :log10, :asinh, :sqrt]
|
|
||||||
# subplotSupported(::GLVisualizeBackend) = false
|
|
||||||
#
|
|
||||||
# # --------------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# supportedArgs(::PGFPlotsBackend) = [
|
|
||||||
# # :annotation,
|
|
||||||
# # :axis,
|
|
||||||
# :background_color,
|
|
||||||
# # :color_palette,
|
|
||||||
# # :fillrange,
|
|
||||||
# :fillcolor,
|
|
||||||
# :fillalpha,
|
|
||||||
# # :foreground_color,
|
|
||||||
# # :group,
|
|
||||||
# # :label,
|
|
||||||
# # :layout,
|
|
||||||
# # :legend,
|
|
||||||
# :seriescolor, :seriesalpha,
|
|
||||||
# :linecolor,
|
|
||||||
# :linestyle,
|
|
||||||
# :seriestype,
|
|
||||||
# :linewidth,
|
|
||||||
# :linealpha,
|
|
||||||
# :markershape,
|
|
||||||
# :markercolor,
|
|
||||||
# :markersize,
|
|
||||||
# :markeralpha,
|
|
||||||
# # :markerstrokewidth,
|
|
||||||
# :markerstrokecolor,
|
|
||||||
# :markerstrokestyle,
|
|
||||||
# # :n,
|
|
||||||
# # :bins,
|
|
||||||
# # :nc,
|
|
||||||
# # :nr,
|
|
||||||
# # :pos,
|
|
||||||
# # :smooth,
|
|
||||||
# # :show,
|
|
||||||
# # :size,
|
|
||||||
# :title,
|
|
||||||
# # :windowtitle,
|
|
||||||
# :x,
|
|
||||||
# :xlabel,
|
|
||||||
# :xlims,
|
|
||||||
# # :xticks,
|
|
||||||
# :y,
|
|
||||||
# :ylabel,
|
|
||||||
# :ylims,
|
|
||||||
# # :yrightlabel,
|
|
||||||
# # :yticks,
|
|
||||||
# :xscale,
|
|
||||||
# :yscale,
|
|
||||||
# :xflip,
|
|
||||||
# :yflip,
|
|
||||||
# :z,
|
|
||||||
# :zscale,
|
|
||||||
# # :tickfont,
|
|
||||||
# # :guidefont,
|
|
||||||
# # :legendfont,
|
|
||||||
# :grid,
|
|
||||||
# # :surface
|
|
||||||
# # :levels,
|
|
||||||
# ]
|
|
||||||
# supportedAxes(::PGFPlotsBackend) = [:auto, :left]
|
|
||||||
# supportedTypes(::PGFPlotsBackend) = [:path, :path3d, :scatter, :line, :steppre, :stepmid, :steppost, :hist, :bar, :hist2d, :sticks, :ysticks, :xsticks, :contour] # :hexbin, :hline, :vline,]
|
|
||||||
# supportedStyles(::PGFPlotsBackend) = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
|
||||||
# supportedMarkers(::PGFPlotsBackend) = [:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5, :pentagon] #vcat(_allMarkers, Shape)
|
|
||||||
# supportedScales(::PGFPlotsBackend) = [:identity, :log, :ln, :log2, :log10] # :asinh, :sqrt]
|
|
||||||
# subplotSupported(::PGFPlotsBackend) = false
|
|
||||||
@ -20,10 +20,8 @@ function _create_backend_figure(plt::Plot{[PkgName]Backend})
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function _add_series(::[PkgName]AbstractBackend, plt::Plot, d::KW)
|
function _add_series(plt::Plot{[PkgName]Backend}, series::Series)
|
||||||
# TODO: add one series to the underlying package
|
# TODO: add one series to the underlying package
|
||||||
push!(plt.seriesargs, d)
|
|
||||||
plt
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function _add_annotations{X,Y,V}(plt::Plot{[PkgName]AbstractBackend}, anns::AVec{@compat(Tuple{X,Y,V})})
|
function _add_annotations{X,Y,V}(plt::Plot{[PkgName]AbstractBackend}, anns::AVec{@compat(Tuple{X,Y,V})})
|
||||||
|
|||||||
@ -194,14 +194,16 @@ function _create_backend_figure(plt::Plot{UnicodePlotsBackend})
|
|||||||
# plt
|
# plt
|
||||||
end
|
end
|
||||||
|
|
||||||
function _add_series(::UnicodePlotsBackend, plt::Plot, d::KW)
|
function _add_series(plt::Plot{UnicodePlotsBackend}, series::Series)
|
||||||
|
d = series.d
|
||||||
|
# TODO don't need these once the "bar" series recipe is done
|
||||||
if d[:seriestype] in (:sticks, :bar)
|
if d[:seriestype] in (:sticks, :bar)
|
||||||
d = barHack(; d...)
|
d = barHack(; d...)
|
||||||
elseif d[:seriestype] == :hist
|
elseif d[:seriestype] == :hist
|
||||||
d = barHack(; histogramHack(; d...)...)
|
d = barHack(; histogramHack(; d...)...)
|
||||||
end
|
end
|
||||||
push!(plt.seriesargs, d)
|
# push!(plt.seriesargs, d)
|
||||||
plt
|
# plt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
19
src/plot.jl
19
src/plot.jl
@ -142,7 +142,10 @@ function _apply_series_recipe(plt::Plot, d::KW)
|
|||||||
if st in supportedTypes()
|
if st in supportedTypes()
|
||||||
# println("adding series!!")
|
# println("adding series!!")
|
||||||
warnOnUnsupported(plt.backend, d)
|
warnOnUnsupported(plt.backend, d)
|
||||||
_add_series(plt.backend, plt, d)
|
series = Series(d)
|
||||||
|
push!(plt.series_list, series)
|
||||||
|
# _add_series(plt.backend, plt, d)
|
||||||
|
_add_series(plt, series)
|
||||||
else
|
else
|
||||||
# get a sub list of series for this seriestype
|
# get a sub list of series for this seriestype
|
||||||
series_list = try
|
series_list = try
|
||||||
@ -208,7 +211,7 @@ function _plot!(plt::Plot, d::KW, args...)
|
|||||||
|
|
||||||
# if there was a grouping, filter the data here
|
# if there was a grouping, filter the data here
|
||||||
_filter_input_data!(kw)
|
_filter_input_data!(kw)
|
||||||
@show typeof((kw[:x], kw[:y], kw[:z]))
|
# @show typeof((kw[:x], kw[:y], kw[:z]))
|
||||||
|
|
||||||
# map marker_z if it's a Function
|
# map marker_z if it's a Function
|
||||||
if isa(get(kw, :marker_z, nothing), Function)
|
if isa(get(kw, :marker_z, nothing), Function)
|
||||||
@ -255,9 +258,9 @@ function _plot!(plt::Plot, d::KW, args...)
|
|||||||
# @show anns
|
# @show anns
|
||||||
|
|
||||||
|
|
||||||
for kw in kw_list
|
# for kw in kw_list
|
||||||
@show typeof((kw[:x], kw[:y], kw[:z]))
|
# @show typeof((kw[:x], kw[:y], kw[:z]))
|
||||||
end
|
# end
|
||||||
|
|
||||||
# merge plot args... this is where we combine all the plot args from the user and
|
# merge plot args... this is where we combine all the plot args from the user and
|
||||||
# from the recipes... axis info, colors, etc
|
# from the recipes... axis info, colors, etc
|
||||||
@ -269,9 +272,9 @@ function _plot!(plt::Plot, d::KW, args...)
|
|||||||
handlePlotColors(plt.backend, plt.plotargs)
|
handlePlotColors(plt.backend, plt.plotargs)
|
||||||
end
|
end
|
||||||
|
|
||||||
for kw in kw_list
|
# for kw in kw_list
|
||||||
@show typeof((kw[:x], kw[:y], kw[:z]))
|
# @show typeof((kw[:x], kw[:y], kw[:z]))
|
||||||
end
|
# end
|
||||||
|
|
||||||
# this is it folks!
|
# this is it folks!
|
||||||
# TODO: we probably shouldn't use i for tracking series index, but rather explicitly track it in recipes
|
# TODO: we probably shouldn't use i for tracking series index, but rather explicitly track it in recipes
|
||||||
|
|||||||
@ -216,12 +216,11 @@ end
|
|||||||
|
|
||||||
# for seriestype `line`, need to sort by x values
|
# for seriestype `line`, need to sort by x values
|
||||||
@recipe function f(::Type{Val{:line}}, x, y, z)
|
@recipe function f(::Type{Val{:line}}, x, y, z)
|
||||||
# order by x
|
indices = sortperm(x)
|
||||||
indices = sortperm(d[:x])
|
d[:x] = x[indices]
|
||||||
d[:x] = d[:x][indices]
|
d[:y] = y[indices]
|
||||||
d[:y] = d[:y][indices]
|
if typeof(z) <: AVec
|
||||||
if typeof(d[:z]) <: AVec
|
d[:z] = z[indices]
|
||||||
d[:z] = d[:z][indices]
|
|
||||||
end
|
end
|
||||||
d[:seriestype] = :path
|
d[:seriestype] = :path
|
||||||
()
|
()
|
||||||
|
|||||||
56
src/types.jl
56
src/types.jl
@ -16,6 +16,32 @@ end
|
|||||||
wrap{T}(obj::T) = InputWrapper{T}(obj)
|
wrap{T}(obj::T) = InputWrapper{T}(obj)
|
||||||
Base.isempty(wrapper::InputWrapper) = false
|
Base.isempty(wrapper::InputWrapper) = false
|
||||||
|
|
||||||
|
type AxisView
|
||||||
|
label::UTF8String
|
||||||
|
axis::Axis
|
||||||
|
end
|
||||||
|
|
||||||
|
type Subplot
|
||||||
|
axisviews::Vector{AxisView}
|
||||||
|
subplotargs::KW # args specific to this subplot
|
||||||
|
obj # can store backend-specific data... like a pyplot ax
|
||||||
|
end
|
||||||
|
|
||||||
|
type Series
|
||||||
|
d::KW
|
||||||
|
x
|
||||||
|
y
|
||||||
|
z
|
||||||
|
# subplots::Vector{Subplot}
|
||||||
|
end
|
||||||
|
|
||||||
|
function Series(d::KW)
|
||||||
|
x = pop!(d, :x)
|
||||||
|
y = pop!(d, :y)
|
||||||
|
z = pop!(d, :z)
|
||||||
|
Series(d, x, y, z)
|
||||||
|
end
|
||||||
|
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
# Plot
|
# Plot
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
@ -25,7 +51,9 @@ type Plot{T<:AbstractBackend} <: AbstractPlot{T}
|
|||||||
backend::T # the backend type
|
backend::T # the backend type
|
||||||
n::Int # number of series
|
n::Int # number of series
|
||||||
plotargs::KW # arguments for the whole plot
|
plotargs::KW # arguments for the whole plot
|
||||||
seriesargs::Vector{KW} # arguments for each series
|
# seriesargs::Vector{KW} # arguments for each series
|
||||||
|
series_list::Vector{Series} # arguments for each series
|
||||||
|
subplots::Vector{Subplot}
|
||||||
end
|
end
|
||||||
|
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
@ -38,18 +66,18 @@ abstract SubplotLayout
|
|||||||
# Subplot
|
# Subplot
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
|
|
||||||
type Subplot{T<:AbstractBackend, L<:SubplotLayout} <: AbstractPlot{T}
|
# type Subplot{T<:AbstractBackend, L<:SubplotLayout} <: AbstractPlot{T}
|
||||||
o # the underlying object
|
# o # the underlying object
|
||||||
plts::Vector{Plot{T}} # the individual plots
|
# plts::Vector{Plot{T}} # the individual plots
|
||||||
backend::T
|
# backend::T
|
||||||
p::Int # number of plots
|
# p::Int # number of plots
|
||||||
n::Int # number of series
|
# n::Int # number of series
|
||||||
layout::L
|
# layout::L
|
||||||
plotargs::KW
|
# plotargs::KW
|
||||||
initialized::Bool
|
# initialized::Bool
|
||||||
linkx::Bool
|
# linkx::Bool
|
||||||
linky::Bool
|
# linky::Bool
|
||||||
linkfunc::Function # maps (row,column) -> (BoolOrNothing, BoolOrNothing)... if xlink/ylink are nothing, then use subplt.linkx/y
|
# linkfunc::Function # maps (row,column) -> (BoolOrNothing, BoolOrNothing)... if xlink/ylink are nothing, then use subplt.linkx/y
|
||||||
end
|
# end
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user