split out supported.jl, added tests for more backends; closes #206
This commit is contained in:
parent
005ce11313
commit
0e84c91451
@ -40,7 +40,7 @@ end
|
|||||||
@init_backend PGFPlots
|
@init_backend PGFPlots
|
||||||
|
|
||||||
include("backends/web.jl")
|
include("backends/web.jl")
|
||||||
include("backends/supported.jl")
|
# include("backends/supported.jl")
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
@ -80,7 +80,10 @@ function pickDefaultBackend()
|
|||||||
end
|
end
|
||||||
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
|
if Pkg.installed(pkgstr) != nothing
|
||||||
return backend(symbol(lowercase(pkgstr)))
|
return backend(symbol(lowercase(pkgstr)))
|
||||||
end
|
end
|
||||||
@ -135,3 +138,23 @@ function backend(modname::Symbol)
|
|||||||
CURRENT_BACKEND.sym = modname
|
CURRENT_BACKEND.sym = modname
|
||||||
CURRENT_BACKEND.pkg = _backend_instance(modname)
|
CURRENT_BACKEND.pkg = _backend_instance(modname)
|
||||||
end
|
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())
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
|||||||
@ -2,6 +2,75 @@
|
|||||||
# https://github.com/bokeh/Bokeh.jl
|
# 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...)
|
function _initialize_backend(::BokehBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
warn("Bokeh is no longer supported... many features will likely be broken.")
|
warn("Bokeh is no longer supported... many features will likely be broken.")
|
||||||
|
|||||||
@ -2,6 +2,43 @@
|
|||||||
# https://github.com/dcjones/Gadfly.jl
|
# 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...)
|
function _initialize_backend(::GadflyBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
import Gadfly, Compose
|
import Gadfly, Compose
|
||||||
|
|||||||
@ -2,6 +2,73 @@
|
|||||||
|
|
||||||
# [WEBSITE]
|
# [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...)
|
function _initialize_backend(::GLVisualizeBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
import GLVisualize
|
import GLVisualize
|
||||||
|
|||||||
@ -1,6 +1,50 @@
|
|||||||
|
|
||||||
# https://github.com/jheinen/GR.jl
|
# 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...)
|
function _initialize_backend(::GRBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
import GR
|
import GR
|
||||||
|
|||||||
@ -1,6 +1,16 @@
|
|||||||
|
|
||||||
# https://github.com/JuliaGraphics/Immerse.jl
|
# 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...)
|
function _initialize_backend(::ImmerseBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
import Immerse, Gadfly, Compose, Gtk
|
import Immerse, Gadfly, Compose, Gtk
|
||||||
|
|||||||
@ -1,5 +1,74 @@
|
|||||||
# https://github.com/sisl/PGFPlots.jl
|
# 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...)
|
function _initialize_backend(::PGFPlotsBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
import PGFPlots
|
import PGFPlots
|
||||||
|
|||||||
@ -1,6 +1,83 @@
|
|||||||
|
|
||||||
# https://plot.ly/javascript/getting-started
|
# 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...)
|
function _initialize_backend(::PlotlyBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
import JSON
|
import JSON
|
||||||
|
|||||||
@ -1,6 +1,82 @@
|
|||||||
|
|
||||||
# https://github.com/spencerlyon2/PlotlyJS.jl
|
# 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...)
|
function _initialize_backend(::PlotlyJSBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
import PlotlyJS
|
import PlotlyJS
|
||||||
|
|||||||
@ -1,6 +1,57 @@
|
|||||||
|
|
||||||
# https://github.com/stevengj/PyPlot.jl
|
# 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)
|
function _initialize_backend(::PyPlotBackend)
|
||||||
@eval begin
|
@eval begin
|
||||||
import PyPlot
|
import PyPlot
|
||||||
|
|||||||
@ -1,6 +1,57 @@
|
|||||||
|
|
||||||
# https://github.com/tbreloff/Qwt.jl
|
# 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...)
|
function _initialize_backend(::QwtBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
warn("Qwt is no longer supported... many features will likely be broken.")
|
warn("Qwt is no longer supported... many features will likely be broken.")
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,68 @@
|
|||||||
|
|
||||||
# https://github.com/Evizero/UnicodePlots.jl
|
# 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...)
|
function _initialize_backend(::UnicodePlotsBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
import UnicodePlots
|
import UnicodePlots
|
||||||
|
|||||||
@ -3,6 +3,69 @@
|
|||||||
|
|
||||||
# credit goes to https://github.com/jverzani for contributing to the first draft of this backend implementation
|
# 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...)
|
function _initialize_backend(::WinstonBackend; kw...)
|
||||||
@eval begin
|
@eval begin
|
||||||
# ENV["WINSTON_OUTPUT"] = "gtk"
|
# ENV["WINSTON_OUTPUT"] = "gtk"
|
||||||
|
|||||||
@ -6,6 +6,7 @@ Requires
|
|||||||
FactCheck
|
FactCheck
|
||||||
Cairo
|
Cairo
|
||||||
Gadfly
|
Gadfly
|
||||||
|
Immerse
|
||||||
Images
|
Images
|
||||||
PlotlyJS
|
PlotlyJS
|
||||||
PyPlot
|
PyPlot
|
||||||
@ -14,3 +15,4 @@ GR
|
|||||||
DataFrames
|
DataFrames
|
||||||
RDatasets
|
RDatasets
|
||||||
VisualRegressionTests
|
VisualRegressionTests
|
||||||
|
UnicodePlots
|
||||||
|
|||||||
@ -4,7 +4,7 @@ include("imgcomp.jl")
|
|||||||
|
|
||||||
# don't actually show the plots
|
# don't actually show the plots
|
||||||
srand(1234)
|
srand(1234)
|
||||||
default(show=false)
|
default(show=false, reuse=true)
|
||||||
img_eps = 5e-2
|
img_eps = 5e-2
|
||||||
|
|
||||||
facts("Gadfly") do
|
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)
|
# @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
|
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()
|
FactCheck.exitstatus()
|
||||||
end # module
|
end # module
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user