From 0e84c914514f71c6285f06a3e608c0f480b96d24 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Fri, 29 Apr 2016 10:13:41 -0400 Subject: [PATCH] split out supported.jl, added tests for more backends; closes #206 --- src/backends.jl | 27 +- src/backends/bokeh.jl | 69 ++ src/backends/gadfly.jl | 37 + src/backends/glvisualize.jl | 67 ++ src/backends/gr.jl | 44 ++ src/backends/immerse.jl | 10 + src/backends/pgfplots.jl | 69 ++ src/backends/plotly.jl | 77 ++ src/backends/plotlyjs.jl | 76 ++ src/backends/pyplot.jl | 51 ++ src/backends/qwt.jl | 51 ++ src/backends/supported.jl | 1386 +++++++++++++++++----------------- src/backends/unicodeplots.jl | 62 ++ src/backends/winston.jl | 63 ++ test/REQUIRE | 2 + test/runtests.jl | 33 +- 16 files changed, 1423 insertions(+), 701 deletions(-) diff --git a/src/backends.jl b/src/backends.jl index 4e47d6a0..62d78164 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -40,7 +40,7 @@ end @init_backend PGFPlots include("backends/web.jl") -include("backends/supported.jl") +# include("backends/supported.jl") # --------------------------------------------------------- @@ -80,7 +80,10 @@ function pickDefaultBackend() end end - for pkgstr in ("PyPlot", "Immerse", "Qwt", "Gadfly", "GR", "UnicodePlots", "Bokeh", "GLVisualize") + # the ordering/inclusion of this package list is my semi-arbitrary guess at + # which one someone will want to use if they have the package installed...accounting for + # features, speed, and robustness + for pkgstr in ("PyPlot", "GR", "PlotlyJS", "Immerse", "Gadfly", "UnicodePlots") if Pkg.installed(pkgstr) != nothing return backend(symbol(lowercase(pkgstr))) end @@ -135,3 +138,23 @@ function backend(modname::Symbol) CURRENT_BACKEND.sym = modname CURRENT_BACKEND.pkg = _backend_instance(modname) end + +# --------------------------------------------------------- + +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()) + +# --------------------------------------------------------- diff --git a/src/backends/bokeh.jl b/src/backends/bokeh.jl index e518a554..92fbce1d 100644 --- a/src/backends/bokeh.jl +++ b/src/backends/bokeh.jl @@ -2,6 +2,75 @@ # https://github.com/bokeh/Bokeh.jl +supportedArgs(::BokehBackend) = [ + # :annotation, + # :axis, + # :background_color, + :linecolor, + # :color_palette, + # :fillrange, + # :fillcolor, + # :fillalpha, + # :foreground_color, + :group, + # :label, + # :layout, + # :legend, + :seriescolor, :seriesalpha, + :linestyle, + :linetype, + :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 + + +# -------------------------------------------------------------------------------------- + + + function _initialize_backend(::BokehBackend; kw...) @eval begin warn("Bokeh is no longer supported... many features will likely be broken.") diff --git a/src/backends/gadfly.jl b/src/backends/gadfly.jl index 3714fe42..83d14409 100644 --- a/src/backends/gadfly.jl +++ b/src/backends/gadfly.jl @@ -2,6 +2,43 @@ # https://github.com/dcjones/Gadfly.jl +supportedArgs(::GadflyBackend) = [ + :annotation, + :background_color, :foreground_color, :color_palette, + :group, :label, :linetype, + :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 + + +# -------------------------------------------------------------------------------------- + function _initialize_backend(::GadflyBackend; kw...) @eval begin import Gadfly, Compose diff --git a/src/backends/glvisualize.jl b/src/backends/glvisualize.jl index aea9c176..1f2d9523 100644 --- a/src/backends/glvisualize.jl +++ b/src/backends/glvisualize.jl @@ -2,6 +2,73 @@ # [WEBSITE] +supportedArgs(::GLVisualizeBackend) = [ + # :annotation, + # :axis, + # :background_color, + # :color_palette, + # :fillrange, + # :fillcolor, + # :fillalpha, + # :foreground_color, + # :group, + # :label, + # :layout, + # :legend, + # :linecolor, + # :linestyle, + :linetype + # :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 + +# -------------------------------------------------------------------------------------- + + function _initialize_backend(::GLVisualizeBackend; kw...) @eval begin import GLVisualize diff --git a/src/backends/gr.jl b/src/backends/gr.jl index cfff4c7e..1e3934f9 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -1,6 +1,50 @@ # https://github.com/jheinen/GR.jl + +supportedArgs(::GRBackend) = [ + :annotation, + :background_color, :foreground_color, :color_palette, + :group, + :label, + :linetype, + :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 + + +# -------------------------------------------------------------------------------------- + + function _initialize_backend(::GRBackend; kw...) @eval begin import GR diff --git a/src/backends/immerse.jl b/src/backends/immerse.jl index 23c76361..a896b5ce 100644 --- a/src/backends/immerse.jl +++ b/src/backends/immerse.jl @@ -1,6 +1,16 @@ # https://github.com/JuliaGraphics/Immerse.jl +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 + +# -------------------------------------------------------------------------------------- + function _initialize_backend(::ImmerseBackend; kw...) @eval begin import Immerse, Gadfly, Compose, Gtk diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index d10717f5..a9d6aba9 100644 --- a/src/backends/pgfplots.jl +++ b/src/backends/pgfplots.jl @@ -1,5 +1,74 @@ # https://github.com/sisl/PGFPlots.jl +supportedArgs(::PGFPlotsBackend) = [ + # :annotation, + # :axis, + :background_color, + # :color_palette, + # :fillrange, + :fillcolor, + :fillalpha, + # :foreground_color, + # :group, + # :label, + # :layout, + # :legend, + :seriescolor, :seriesalpha, + :linecolor, + :linestyle, + :linetype, + :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 + + +# -------------------------------------------------------------------------------------- + + function _initialize_backend(::PGFPlotsBackend; kw...) @eval begin import PGFPlots diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index fb443ebd..d7a1527d 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -1,6 +1,83 @@ # https://plot.ly/javascript/getting-started +supportedArgs(::PlotlyBackend) = [ + :annotation, + # :axis, + :background_color, + :color_palette, + :fillrange, + :fillcolor, + :fillalpha, + :foreground_color, + :group, + :label, + :layout, + :legend, + :seriescolor, :seriesalpha, + :linecolor, + :linestyle, + :linetype, + :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 + + +# -------------------------------------------------------------------------------------- + function _initialize_backend(::PlotlyBackend; kw...) @eval begin import JSON diff --git a/src/backends/plotlyjs.jl b/src/backends/plotlyjs.jl index 0277ffd5..b736e270 100644 --- a/src/backends/plotlyjs.jl +++ b/src/backends/plotlyjs.jl @@ -1,6 +1,82 @@ # https://github.com/spencerlyon2/PlotlyJS.jl +supportedArgs(::PlotlyJSBackend) = [ + :annotation, + # :axis, + :background_color, + :color_palette, + :fillrange, + :fillcolor, + :fillalpha, + :foreground_color, + :group, + :label, + :layout, + :legend, + :seriescolor, :seriesalpha, + :linecolor, + :linestyle, + :linetype, + :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 + +# -------------------------------------------------------------------------------------- + function _initialize_backend(::PlotlyJSBackend; kw...) @eval begin import PlotlyJS diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index dad7693d..69c05553 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -1,6 +1,57 @@ # https://github.com/stevengj/PyPlot.jl + +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, + :linetype, + :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 + + +# -------------------------------------------------------------------------------------- + + function _initialize_backend(::PyPlotBackend) @eval begin import PyPlot diff --git a/src/backends/qwt.jl b/src/backends/qwt.jl index 218b1ca2..0a83ffa2 100644 --- a/src/backends/qwt.jl +++ b/src/backends/qwt.jl @@ -1,6 +1,57 @@ # https://github.com/tbreloff/Qwt.jl + +supportedArgs(::QwtBackend) = [ + :annotation, + :axis, + :background_color, + :linecolor, + :color_palette, + :fillrange, + :fillcolor, + :foreground_color, + :group, + :label, + :layout, + :legend, + :seriescolor, :seriesalpha, + :linestyle, + :linetype, + :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 + + +# -------------------------------------------------------------------------------------- + function _initialize_backend(::QwtBackend; kw...) @eval begin warn("Qwt is no longer supported... many features will likely be broken.") diff --git a/src/backends/supported.jl b/src/backends/supported.jl index a6565cab..8408cf18 100644 --- a/src/backends/supported.jl +++ b/src/backends/supported.jl @@ -1,708 +1,698 @@ - -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()) +# +# 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, +# :linetype, +# :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(::GadflyBackend) = [ - :annotation, - :background_color, :foreground_color, :color_palette, - :group, - :label, - :linetype, - :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(::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, +# :linetype, +# :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, +# :linetype, +# :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, +# :linetype, +# :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, +# :linetype, +# # :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(::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(::WinstonBackend) = [ +# :annotation, +# # :args, +# # :axis, +# # :background_color, +# :linecolor, +# :color_palette, +# :fillrange, +# :fillcolor, +# # :foreground_color, +# :group, +# # :heatmap_c, +# # :kwargs, +# :label, +# # :layout, +# :legend, +# :seriescolor, :seriesalpha, +# :linestyle, +# :linetype, +# :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(::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, - :linetype, - :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, - :linetype, - :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, - # :args, - :axis, - :background_color, - :linecolor, - :color_palette, - :fillrange, - :fillcolor, - :foreground_color, - :group, - # :heatmap_c, - # :kwargs, - :label, - :layout, - :legend, - :seriescolor, :seriesalpha, - :linestyle, - :linetype, - :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, - ] -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, - :linetype, - # :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, - :linetype, - :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, - :linetype, - :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, - :linetype, - :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, - :linetype, - :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, - :linetype - # :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, - :linetype, - :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 +# +# +# supportedArgs(::BokehBackend) = [ +# # :annotation, +# # :axis, +# # :background_color, +# :linecolor, +# # :color_palette, +# # :fillrange, +# # :fillcolor, +# # :fillalpha, +# # :foreground_color, +# :group, +# # :label, +# # :layout, +# # :legend, +# :seriescolor, :seriesalpha, +# :linestyle, +# :linetype, +# :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, +# :linetype, +# :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, +# :linetype, +# :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, +# :linetype +# # :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, +# :linetype, +# :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 diff --git a/src/backends/unicodeplots.jl b/src/backends/unicodeplots.jl index ce5c3a99..13d8b6cc 100644 --- a/src/backends/unicodeplots.jl +++ b/src/backends/unicodeplots.jl @@ -1,6 +1,68 @@ # https://github.com/Evizero/UnicodePlots.jl +supportedArgs(::UnicodePlotsBackend) = [ + # :annotation, + # :args, + # :axis, + # :background_color, + # :linecolor, + # :fill, + # :foreground_color, + :group, + # :heatmap_c, + # :kwargs, + :label, + # :layout, + :legend, + :seriescolor, :seriesalpha, + :linestyle, + :linetype, + # :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 + + + + +# -------------------------------------------------------------------------------------- + function _initialize_backend(::UnicodePlotsBackend; kw...) @eval begin import UnicodePlots diff --git a/src/backends/winston.jl b/src/backends/winston.jl index e4c85195..1c662e90 100644 --- a/src/backends/winston.jl +++ b/src/backends/winston.jl @@ -3,6 +3,69 @@ # credit goes to https://github.com/jverzani for contributing to the first draft of this backend implementation +supportedArgs(::WinstonBackend) = [ + :annotation, + # :args, + # :axis, + # :background_color, + :linecolor, + :color_palette, + :fillrange, + :fillcolor, + # :foreground_color, + :group, + # :heatmap_c, + # :kwargs, + :label, + # :layout, + :legend, + :seriescolor, :seriesalpha, + :linestyle, + :linetype, + :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 + + +# -------------------------------------------------------------------------------------- + + function _initialize_backend(::WinstonBackend; kw...) @eval begin # ENV["WINSTON_OUTPUT"] = "gtk" diff --git a/test/REQUIRE b/test/REQUIRE index bbed05ec..97f743aa 100644 --- a/test/REQUIRE +++ b/test/REQUIRE @@ -6,6 +6,7 @@ Requires FactCheck Cairo Gadfly +Immerse Images PlotlyJS PyPlot @@ -14,3 +15,4 @@ GR DataFrames RDatasets VisualRegressionTests +UnicodePlots diff --git a/test/runtests.jl b/test/runtests.jl index 86f48424..eaa60bde 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,7 +4,7 @@ include("imgcomp.jl") # don't actually show the plots srand(1234) -default(show=false) +default(show=false, reuse=true) img_eps = 5e-2 facts("Gadfly") do @@ -41,5 +41,36 @@ facts("Plotly") do # @linux_only image_comparison_facts(:plotly, only=[1,3,4,7,8,9,10,11,12,14,15,20,22,23,27], eps=img_eps) end + +facts("Immerse") do + @fact immerse() --> Plots.ImmerseBackend() + @fact backend() --> Plots.ImmerseBackend() + + # as long as we can plot anything without error, it should be the same as Gadfly + image_comparison_facts(:immerse, only=[1], eps=img_eps) +end + + +facts("PlotlyJS") do + @fact plotlyjs() --> Plots.PlotlyJSBackend() + @fact backend() --> Plots.PlotlyJSBackend() + + # as long as we can plot anything without error, it should be the same as Plotly + image_comparison_facts(:plotlyjs, only=[1], eps=img_eps) +end + + +facts("UnicodePlots") do + @fact unicodeplots() --> Plots.UnicodePlotsBackend() + @fact backend() --> Plots.UnicodePlotsBackend() + + # lets just make sure it runs without error + @fact isa(plot(rand(10)), Plot) --> true +end + + + + + FactCheck.exitstatus() end # module