From fc6f0f3a862fa247e8c34d82233be93f939a89e0 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Sat, 21 Nov 2015 10:10:09 -0500 Subject: [PATCH] fixes in supported --- src/args.jl | 14 ------ src/backends/supported.jl | 89 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 14 deletions(-) diff --git a/src/args.jl b/src/args.jl index ae65ff3f..509c2af3 100644 --- a/src/args.jl +++ b/src/args.jl @@ -96,20 +96,6 @@ const _allScales = [:identity, :log, :log2, :log10, :asinh, :sqrt] :ln => :log, ) -supportedAxes(::PlottingPackage) = [:left] -supportedTypes(::PlottingPackage) = [] -supportedStyles(::PlottingPackage) = [:solid] -supportedMarkers(::PlottingPackage) = [:none] -supportedScales(::PlottingPackage) = [:identity] -subplotSupported(::PlottingPackage) = false - -supportedAxes() = supportedAxes(backend()) -supportedTypes() = supportedTypes(backend()) -supportedStyles() = supportedStyles(backend()) -supportedMarkers() = supportedMarkers(backend()) -supportedScales() = supportedScales(backend()) -subplotSupported() = subplotSupported(backend()) - # ----------------------------------------------------------------------------- const _seriesDefaults = Dict{Symbol, Any}() diff --git a/src/backends/supported.jl b/src/backends/supported.jl index f2b78f70..a6926f8e 100644 --- a/src/backends/supported.jl +++ b/src/backends/supported.jl @@ -1,4 +1,22 @@ +supportedAxes(::PlottingPackage) = [:left] +supportedTypes(::PlottingPackage) = [] +supportedStyles(::PlottingPackage) = [:solid] +supportedMarkers(::PlottingPackage) = [:none] +supportedScales(::PlottingPackage) = [:identity] +subplotSupported(::PlottingPackage) = false + +supportedAxes() = supportedAxes(backend()) +supportedTypes() = supportedTypes(backend()) +supportedStyles() = supportedStyles(backend()) +supportedMarkers() = supportedMarkers(backend()) +supportedScales() = supportedScales(backend()) +subplotSupported() = subplotSupported(backend()) + + +# -------------------------------------------------------------------------------------- + + supportedArgs(::GadflyPackage) = [ :annotation, # :axis, @@ -63,6 +81,7 @@ supportedTypes(::GadflyPackage) = [:none, :line, :path, :steppre, :steppost, :st supportedStyles(::GadflyPackage) = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot] supportedMarkers(::GadflyPackage) = vcat(_allMarkers, Shape) supportedScales(::GadflyPackage) = [:identity, :log, :log2, :log10, :asinh, :sqrt] +subplotSupported(::GadflyPackage) = true # -------------------------------------------------------------------------------------- @@ -74,6 +93,7 @@ supportedTypes(::ImmersePackage) = supportedTypes(GadflyPackage()) supportedStyles(::ImmersePackage) = supportedStyles(GadflyPackage()) supportedMarkers(::ImmersePackage) = supportedMarkers(GadflyPackage()) supportedScales(::ImmersePackage) = supportedScales(GadflyPackage()) +subplotSupported(::ImmersePackage) = true # -------------------------------------------------------------------------------------- @@ -206,6 +226,7 @@ supportedArgs(::QwtPackage) = [ supportedTypes(::QwtPackage) = [:none, :line, :path, :steppre, :steppost, :sticks, :scatter, :heatmap, :hexbin, :hist, :bar, :hline, :vline] supportedMarkers(::QwtPackage) = [:none, :auto, :rect, :ellipse, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5, :star8, :hexagon] supportedScales(::QwtPackage) = [:identity, :log10] +subplotSupported(::QwtPackage) = true # -------------------------------------------------------------------------------------- @@ -265,6 +286,7 @@ supportedTypes(::UnicodePlotsPackage) = [:none, :line, :path, :steppost, :sticks supportedStyles(::UnicodePlotsPackage) = [:auto, :solid] supportedMarkers(::UnicodePlotsPackage) = [:none, :auto, :ellipse] supportedScales(::UnicodePlotsPackage) = [:identity] +subplotSupported(::UnicodePlotsPackage) = true @@ -396,5 +418,72 @@ supportedTypes(::BokehPackage) = [:none, :path, :scatter] #,:steppre, :steppost, supportedStyles(::BokehPackage) = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot] supportedMarkers(::BokehPackage) = [:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5] #vcat(_allMarkers, Shape) supportedScales(::BokehPackage) = [:identity, :log] #, :log, :log2, :log10, :asinh, :sqrt] +subplotSupported(::BokehPackage) = false + + +# -------------------------------------------------------------------------------------- + +supportedArgs(::PlotlyPackage) = [ + # :annotation, + # :axis, + :background_color, + :color_palette, + # :fillrange, + # :fillcolor, + # :fillalpha, + :foreground_color, + :group, + :label, + # :layout, + :legend, + :linecolor, + :linestyle, + :linetype, + :linewidth, + :linealpha, + :markershape, + :markercolor, + :markersize, + :markeralpha, + :markerstrokewidth, + :markerstrokecolor, + :markerstrokestyle, + # :n, + # :nbins, + # :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, + # :nlevels, + ] +supportedAxes(::PlotlyPackage) = [:auto, :left] +supportedTypes(::PlotlyPackage) = [:none, :path, :scatter] #,:steppre, :steppost, :sticks, :heatmap, :hexbin, :hist, :bar, :hline, :vline, :contour] +supportedStyles(::PlotlyPackage) = [:auto, :solid] #, :dash, :dot, :dashdot, :dashdotdot] +supportedMarkers(::PlotlyPackage) = [:none, :auto, :ellipse] #, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5] #vcat(_allMarkers, Shape) +supportedScales(::PlotlyPackage) = [:identity, :log] #, :log, :log2, :log10, :asinh, :sqrt] +subplotSupported(::PlotlyPackage) = false