Merge branch 'master' into sd-remote
This commit is contained in:
commit
0ecee70af2
6
NEWS.md
6
NEWS.md
@ -12,6 +12,12 @@
|
|||||||
## (current master)
|
## (current master)
|
||||||
- All new development should target Julia 1.x!
|
- All new development should target Julia 1.x!
|
||||||
|
|
||||||
|
## 0.20.5
|
||||||
|
- fix precompilation issue when depending on Plots
|
||||||
|
|
||||||
|
## 0.20.4
|
||||||
|
- honour `html_output_format` in Juno
|
||||||
|
|
||||||
## 0.20.3
|
## 0.20.3
|
||||||
- implement guide position in gr, pyplot and pgfplots
|
- implement guide position in gr, pyplot and pgfplots
|
||||||
- inspectdr fixes
|
- inspectdr fixes
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
module Plots
|
module Plots
|
||||||
|
|
||||||
|
_current_plots_version = v"0.20.1"
|
||||||
|
|
||||||
using Reexport
|
using Reexport
|
||||||
|
|
||||||
import StaticArrays
|
import StaticArrays
|
||||||
|
|||||||
411
src/backends.jl
411
src/backends.jl
@ -149,7 +149,7 @@ function pickDefaultBackend()
|
|||||||
@warn("You have set `PLOTS_DEFAULT_BACKEND=$env_default` but `$(backend_package_name(sym))` is not loaded.")
|
@warn("You have set `PLOTS_DEFAULT_BACKEND=$env_default` but `$(backend_package_name(sym))` is not loaded.")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@warn("You have set PLOTS_DEFAULT_BACKEND=$env_default but it is not a valid backend package. Choose from:\n\t",
|
@warn("You have set PLOTS_DEFAULT_BACKEND=$env_default but it is not a valid backend package. Choose from:\n\t" *
|
||||||
join(sort(_backends), "\n\t"))
|
join(sort(_backends), "\n\t"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -330,6 +330,126 @@ function add_backend_string(pkg::AbstractBackend)
|
|||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# gr
|
||||||
|
|
||||||
|
const _gr_attr = merge_with_base_supported([
|
||||||
|
:annotations,
|
||||||
|
:background_color_legend, :background_color_inside, :background_color_outside,
|
||||||
|
:foreground_color_legend, :foreground_color_grid, :foreground_color_axis,
|
||||||
|
:foreground_color_text, :foreground_color_border,
|
||||||
|
:label,
|
||||||
|
:seriescolor, :seriesalpha,
|
||||||
|
:linecolor, :linestyle, :linewidth, :linealpha,
|
||||||
|
:markershape, :markercolor, :markersize, :markeralpha,
|
||||||
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
||||||
|
:fillrange, :fillcolor, :fillalpha,
|
||||||
|
:bins,
|
||||||
|
:layout,
|
||||||
|
:title, :window_title,
|
||||||
|
:guide, :lims, :ticks, :scale, :flip,
|
||||||
|
:match_dimensions,
|
||||||
|
:titlefontfamily, :titlefontsize, :titlefonthalign, :titlefontvalign,
|
||||||
|
:titlefontrotation, :titlefontcolor,
|
||||||
|
:legendfontfamily, :legendfontsize, :legendfonthalign, :legendfontvalign,
|
||||||
|
:legendfontrotation, :legendfontcolor,
|
||||||
|
:tickfontfamily, :tickfontsize, :tickfonthalign, :tickfontvalign,
|
||||||
|
:tickfontrotation, :tickfontcolor,
|
||||||
|
:guidefontfamily, :guidefontsize, :guidefonthalign, :guidefontvalign,
|
||||||
|
:guidefontrotation, :guidefontcolor,
|
||||||
|
:grid, :gridalpha, :gridstyle, :gridlinewidth,
|
||||||
|
:legend, :legendtitle, :colorbar, :colorbar_title,
|
||||||
|
:fill_z, :line_z, :marker_z, :levels,
|
||||||
|
:ribbon, :quiver,
|
||||||
|
:orientation,
|
||||||
|
:overwrite_figure,
|
||||||
|
:polar,
|
||||||
|
:aspect_ratio,
|
||||||
|
:normalize, :weights,
|
||||||
|
:inset_subplots,
|
||||||
|
:bar_width,
|
||||||
|
:arrow,
|
||||||
|
:framestyle,
|
||||||
|
:tick_direction,
|
||||||
|
:camera,
|
||||||
|
:contour_labels,
|
||||||
|
])
|
||||||
|
const _gr_seriestype = [
|
||||||
|
:path, :scatter, :straightline,
|
||||||
|
:heatmap, :pie, :image,
|
||||||
|
:contour, :path3d, :scatter3d, :surface, :wireframe,
|
||||||
|
:shape
|
||||||
|
]
|
||||||
|
const _gr_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
||||||
|
const _gr_marker = _allMarkers
|
||||||
|
const _gr_scale = [:identity, :log10]
|
||||||
|
is_marker_supported(::GRBackend, shape::Shape) = true
|
||||||
|
|
||||||
|
function add_backend_string(::GRBackend)
|
||||||
|
"""
|
||||||
|
Pkg.add("GR")
|
||||||
|
Pkg.build("GR")
|
||||||
|
"""
|
||||||
|
end
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# plotly
|
||||||
|
|
||||||
|
const _plotly_attr = merge_with_base_supported([
|
||||||
|
:annotations,
|
||||||
|
:background_color_legend, :background_color_inside, :background_color_outside,
|
||||||
|
:foreground_color_legend, :foreground_color_guide,
|
||||||
|
:foreground_color_grid, :foreground_color_axis,
|
||||||
|
:foreground_color_text, :foreground_color_border,
|
||||||
|
:foreground_color_title,
|
||||||
|
:label,
|
||||||
|
:seriescolor, :seriesalpha,
|
||||||
|
:linecolor, :linestyle, :linewidth, :linealpha,
|
||||||
|
:markershape, :markercolor, :markersize, :markeralpha,
|
||||||
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha, :markerstrokestyle,
|
||||||
|
:fillrange, :fillcolor, :fillalpha,
|
||||||
|
:bins,
|
||||||
|
:title, :title_location,
|
||||||
|
:titlefontfamily, :titlefontsize, :titlefonthalign, :titlefontvalign,
|
||||||
|
:titlefontcolor,
|
||||||
|
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
||||||
|
:tickfontfamily, :tickfontsize, :tickfontcolor,
|
||||||
|
:guidefontfamily, :guidefontsize, :guidefontcolor,
|
||||||
|
:window_title,
|
||||||
|
:guide, :lims, :ticks, :scale, :flip, :rotation,
|
||||||
|
:tickfont, :guidefont, :legendfont,
|
||||||
|
:grid, :gridalpha, :gridlinewidth,
|
||||||
|
:legend, :colorbar, :colorbar_title,
|
||||||
|
:marker_z, :fill_z, :line_z, :levels,
|
||||||
|
:ribbon, :quiver,
|
||||||
|
:orientation,
|
||||||
|
# :overwrite_figure,
|
||||||
|
:polar,
|
||||||
|
:normalize, :weights,
|
||||||
|
# :contours,
|
||||||
|
:aspect_ratio,
|
||||||
|
:hover,
|
||||||
|
:inset_subplots,
|
||||||
|
:bar_width,
|
||||||
|
:clims,
|
||||||
|
:framestyle,
|
||||||
|
:tick_direction,
|
||||||
|
:camera,
|
||||||
|
:contour_labels,
|
||||||
|
])
|
||||||
|
|
||||||
|
const _plotly_seriestype = [
|
||||||
|
:path, :scatter, :pie, :heatmap,
|
||||||
|
:contour, :surface, :wireframe, :path3d, :scatter3d, :shape, :scattergl,
|
||||||
|
:straightline
|
||||||
|
]
|
||||||
|
const _plotly_style = [:auto, :solid, :dash, :dot, :dashdot]
|
||||||
|
const _plotly_marker = [
|
||||||
|
:none, :auto, :circle, :rect, :diamond, :utriangle, :dtriangle,
|
||||||
|
:cross, :xcross, :pentagon, :hexagon, :octagon, :vline, :hline
|
||||||
|
]
|
||||||
|
const _plotly_scale = [:identity, :log10]
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# glvisualize
|
# glvisualize
|
||||||
|
|
||||||
@ -347,18 +467,56 @@ function _initialize_backend(::GLVisualizeBackend; kw...)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
const _glvisualize_attr = merge_with_base_supported([
|
||||||
# hdf5
|
:annotations,
|
||||||
|
:background_color_legend, :background_color_inside, :background_color_outside,
|
||||||
function _initialize_backend(::HDF5Backend)
|
:foreground_color_grid, :foreground_color_legend, :foreground_color_title,
|
||||||
@eval Main begin
|
:foreground_color_axis, :foreground_color_border, :foreground_color_guide, :foreground_color_text,
|
||||||
import HDF5
|
:label,
|
||||||
export HDF5
|
:linecolor, :linestyle, :linewidth, :linealpha,
|
||||||
end
|
:markershape, :markercolor, :markersize, :markeralpha,
|
||||||
end
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
||||||
|
:fillrange, :fillcolor, :fillalpha,
|
||||||
|
:bins, :bar_width, :bar_edges, :bar_position,
|
||||||
|
:title, :title_location,
|
||||||
|
:window_title,
|
||||||
|
:guide, :lims, :ticks, :scale, :flip, :rotation,
|
||||||
|
:titlefontsize, :titlefontcolor,
|
||||||
|
:legendfontsize, :legendfontcolor,
|
||||||
|
:tickfontsize,
|
||||||
|
:guidefontsize, :guidefontcolor,
|
||||||
|
:grid, :gridalpha, :gridstyle, :gridlinewidth,
|
||||||
|
:legend, :colorbar,
|
||||||
|
:marker_z,
|
||||||
|
:line_z,
|
||||||
|
:levels,
|
||||||
|
:ribbon, :quiver, :arrow,
|
||||||
|
:orientation,
|
||||||
|
:overwrite_figure,
|
||||||
|
#:polar,
|
||||||
|
:normalize, :weights,
|
||||||
|
:contours, :aspect_ratio,
|
||||||
|
:match_dimensions,
|
||||||
|
:clims,
|
||||||
|
:inset_subplots,
|
||||||
|
:dpi,
|
||||||
|
:hover,
|
||||||
|
:framestyle,
|
||||||
|
:tick_direction,
|
||||||
|
])
|
||||||
|
const _glvisualize_seriestype = [
|
||||||
|
:path, :shape, :straightline,
|
||||||
|
:scatter, :hexbin,
|
||||||
|
:bar, :boxplot,
|
||||||
|
:heatmap, :image, :volume,
|
||||||
|
:contour, :contour3d, :path3d, :scatter3d, :surface, :wireframe
|
||||||
|
]
|
||||||
|
const _glvisualize_style = [:auto, :solid, :dash, :dot, :dashdot]
|
||||||
|
const _glvisualize_marker = _allMarkers
|
||||||
|
const _glvisualize_scale = [:identity, :ln, :log2, :log10]
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# PGFPLOTS
|
# pgfplots
|
||||||
|
|
||||||
function add_backend_string(::PGFPlotsBackend)
|
function add_backend_string(::PGFPlotsBackend)
|
||||||
"""
|
"""
|
||||||
@ -368,19 +526,72 @@ function add_backend_string(::PGFPlotsBackend)
|
|||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
const _pgfplots_attr = merge_with_base_supported([
|
||||||
|
:annotations,
|
||||||
|
:background_color_legend,
|
||||||
|
:background_color_inside,
|
||||||
|
# :background_color_outside,
|
||||||
|
# :foreground_color_legend,
|
||||||
|
:foreground_color_grid, :foreground_color_axis,
|
||||||
|
:foreground_color_text, :foreground_color_border,
|
||||||
|
:label,
|
||||||
|
:seriescolor, :seriesalpha,
|
||||||
|
:linecolor, :linestyle, :linewidth, :linealpha,
|
||||||
|
:markershape, :markercolor, :markersize, :markeralpha,
|
||||||
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha, :markerstrokestyle,
|
||||||
|
:fillrange, :fillcolor, :fillalpha,
|
||||||
|
:bins,
|
||||||
|
# :bar_width, :bar_edges,
|
||||||
|
:title,
|
||||||
|
# :window_title,
|
||||||
|
:guide, :guide_position, :lims, :ticks, :scale, :flip, :rotation,
|
||||||
|
:tickfont, :guidefont, :legendfont,
|
||||||
|
:grid, :legend,
|
||||||
|
:colorbar, :colorbar_title,
|
||||||
|
:fill_z, :line_z, :marker_z, :levels,
|
||||||
|
# :ribbon, :quiver, :arrow,
|
||||||
|
# :orientation,
|
||||||
|
# :overwrite_figure,
|
||||||
|
:polar,
|
||||||
|
# :normalize, :weights, :contours,
|
||||||
|
:aspect_ratio,
|
||||||
|
# :match_dimensions,
|
||||||
|
:tick_direction,
|
||||||
|
:framestyle,
|
||||||
|
:camera,
|
||||||
|
:contour_labels,
|
||||||
|
])
|
||||||
|
const _pgfplots_seriestype = [:path, :path3d, :scatter, :steppre, :stepmid, :steppost, :histogram2d, :ysticks, :xsticks, :contour, :shape, :straightline,]
|
||||||
|
const _pgfplots_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
||||||
|
const _pgfplots_marker = [:none, :auto, :circle, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5, :pentagon, :hline] #vcat(_allMarkers, Shape)
|
||||||
|
const _pgfplots_scale = [:identity, :ln, :log2, :log10]
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# plotlyjs
|
# plotlyjs
|
||||||
|
|
||||||
|
function _initialize_backend(pkg::PlotlyJSBackend)
|
||||||
|
sym = backend_package_name(pkg)
|
||||||
|
@eval Main begin
|
||||||
|
import PlotlyJS, ORCA
|
||||||
|
export PlotlyJS
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function add_backend_string(::PlotlyJSBackend)
|
function add_backend_string(::PlotlyJSBackend)
|
||||||
"""
|
"""
|
||||||
using Pkg
|
using Pkg
|
||||||
Pkg.add("PlotlyJS")
|
Pkg.add(["PlotlyJS", "Blink", "ORCA"])
|
||||||
Pkg.add("Rsvg")
|
|
||||||
import Blink
|
import Blink
|
||||||
Blink.AtomShell.install()
|
Blink.AtomShell.install()
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
const _plotlyjs_attr = _plotly_attr
|
||||||
|
const _plotlyjs_seriestype = _plotly_seriestype
|
||||||
|
const _plotlyjs_style = _plotly_style
|
||||||
|
const _plotlyjs_marker = _plotly_marker
|
||||||
|
const _plotlyjs_scale = _plotly_scale
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# pyplot
|
# pyplot
|
||||||
|
|
||||||
@ -409,8 +620,59 @@ function add_backend_string(::PyPlotBackend)
|
|||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
const _pyplot_attr = merge_with_base_supported([
|
||||||
|
:annotations,
|
||||||
|
:background_color_legend, :background_color_inside, :background_color_outside,
|
||||||
|
:foreground_color_grid, :foreground_color_legend, :foreground_color_title,
|
||||||
|
:foreground_color_axis, :foreground_color_border, :foreground_color_guide, :foreground_color_text,
|
||||||
|
:label,
|
||||||
|
:linecolor, :linestyle, :linewidth, :linealpha,
|
||||||
|
:markershape, :markercolor, :markersize, :markeralpha,
|
||||||
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
||||||
|
:fillrange, :fillcolor, :fillalpha,
|
||||||
|
:bins, :bar_width, :bar_edges, :bar_position,
|
||||||
|
:title, :title_location, :titlefont,
|
||||||
|
:window_title,
|
||||||
|
:guide, :guide_position, :lims, :ticks, :scale, :flip, :rotation,
|
||||||
|
:titlefontfamily, :titlefontsize, :titlefontcolor,
|
||||||
|
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
||||||
|
:tickfontfamily, :tickfontsize, :tickfontcolor,
|
||||||
|
:guidefontfamily, :guidefontsize, :guidefontcolor,
|
||||||
|
:grid, :gridalpha, :gridstyle, :gridlinewidth,
|
||||||
|
:legend, :legendtitle, :colorbar,
|
||||||
|
:marker_z, :line_z, :fill_z,
|
||||||
|
:levels,
|
||||||
|
:ribbon, :quiver, :arrow,
|
||||||
|
:orientation,
|
||||||
|
:overwrite_figure,
|
||||||
|
:polar,
|
||||||
|
:normalize, :weights,
|
||||||
|
:contours, :aspect_ratio,
|
||||||
|
:match_dimensions,
|
||||||
|
:clims,
|
||||||
|
:inset_subplots,
|
||||||
|
:dpi,
|
||||||
|
:colorbar_title,
|
||||||
|
:stride,
|
||||||
|
:framestyle,
|
||||||
|
:tick_direction,
|
||||||
|
:camera,
|
||||||
|
:contour_labels,
|
||||||
|
])
|
||||||
|
const _pyplot_seriestype = [
|
||||||
|
:path, :steppre, :steppost, :shape, :straightline,
|
||||||
|
:scatter, :hexbin, #:histogram2d, :histogram,
|
||||||
|
# :bar,
|
||||||
|
:heatmap, :pie, :image,
|
||||||
|
:contour, :contour3d, :path3d, :scatter3d, :surface, :wireframe
|
||||||
|
]
|
||||||
|
const _pyplot_style = [:auto, :solid, :dash, :dot, :dashdot]
|
||||||
|
const _pyplot_marker = vcat(_allMarkers, :pixel)
|
||||||
|
const _pyplot_scale = [:identity, :ln, :log2, :log10]
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# unicodeplots
|
# unicodeplots
|
||||||
|
|
||||||
function add_backend_string(::UnicodePlotsBackend)
|
function add_backend_string(::UnicodePlotsBackend)
|
||||||
"""
|
"""
|
||||||
using Pkg
|
using Pkg
|
||||||
@ -418,3 +680,126 @@ function add_backend_string(::UnicodePlotsBackend)
|
|||||||
Pkg.build("UnicodePlots")
|
Pkg.build("UnicodePlots")
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
const _unicodeplots_attr = merge_with_base_supported([
|
||||||
|
:label,
|
||||||
|
:legend,
|
||||||
|
:seriescolor,
|
||||||
|
:seriesalpha,
|
||||||
|
:linestyle,
|
||||||
|
:markershape,
|
||||||
|
:bins,
|
||||||
|
:title,
|
||||||
|
:guide, :lims,
|
||||||
|
])
|
||||||
|
const _unicodeplots_seriestype = [
|
||||||
|
:path, :scatter, :straightline,
|
||||||
|
# :bar,
|
||||||
|
:shape,
|
||||||
|
:histogram2d,
|
||||||
|
:spy
|
||||||
|
]
|
||||||
|
const _unicodeplots_style = [:auto, :solid]
|
||||||
|
const _unicodeplots_marker = [:none, :auto, :circle]
|
||||||
|
const _unicodeplots_scale = [:identity]
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# hdf5
|
||||||
|
|
||||||
|
const _hdf5_attr = merge_with_base_supported([
|
||||||
|
:annotations,
|
||||||
|
:background_color_legend, :background_color_inside, :background_color_outside,
|
||||||
|
:foreground_color_grid, :foreground_color_legend, :foreground_color_title,
|
||||||
|
:foreground_color_axis, :foreground_color_border, :foreground_color_guide, :foreground_color_text,
|
||||||
|
:label,
|
||||||
|
:linecolor, :linestyle, :linewidth, :linealpha,
|
||||||
|
:markershape, :markercolor, :markersize, :markeralpha,
|
||||||
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
||||||
|
:fillrange, :fillcolor, :fillalpha,
|
||||||
|
:bins, :bar_width, :bar_edges, :bar_position,
|
||||||
|
:title, :title_location, :titlefont,
|
||||||
|
:window_title,
|
||||||
|
:guide, :lims, :ticks, :scale, :flip, :rotation,
|
||||||
|
:tickfont, :guidefont, :legendfont,
|
||||||
|
:grid, :legend, :colorbar,
|
||||||
|
:marker_z, :line_z, :fill_z,
|
||||||
|
:levels,
|
||||||
|
:ribbon, :quiver, :arrow,
|
||||||
|
:orientation,
|
||||||
|
:overwrite_figure,
|
||||||
|
:polar,
|
||||||
|
:normalize, :weights,
|
||||||
|
:contours, :aspect_ratio,
|
||||||
|
:match_dimensions,
|
||||||
|
:clims,
|
||||||
|
:inset_subplots,
|
||||||
|
:dpi,
|
||||||
|
:colorbar_title,
|
||||||
|
])
|
||||||
|
const _hdf5_seriestype = [
|
||||||
|
:path, :steppre, :steppost, :shape, :straightline,
|
||||||
|
:scatter, :hexbin, #:histogram2d, :histogram,
|
||||||
|
# :bar,
|
||||||
|
:heatmap, :pie, :image,
|
||||||
|
:contour, :contour3d, :path3d, :scatter3d, :surface, :wireframe
|
||||||
|
]
|
||||||
|
const _hdf5_style = [:auto, :solid, :dash, :dot, :dashdot]
|
||||||
|
const _hdf5_marker = vcat(_allMarkers, :pixel)
|
||||||
|
const _hdf5_scale = [:identity, :ln, :log2, :log10]
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# inspectdr
|
||||||
|
|
||||||
|
const _inspectdr_attr = merge_with_base_supported([
|
||||||
|
:annotations,
|
||||||
|
:background_color_legend, :background_color_inside, :background_color_outside,
|
||||||
|
# :foreground_color_grid,
|
||||||
|
:foreground_color_legend, :foreground_color_title,
|
||||||
|
:foreground_color_axis, :foreground_color_border, :foreground_color_guide, :foreground_color_text,
|
||||||
|
:label,
|
||||||
|
:seriescolor, :seriesalpha,
|
||||||
|
:linecolor, :linestyle, :linewidth, :linealpha,
|
||||||
|
:markershape, :markercolor, :markersize, :markeralpha,
|
||||||
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
||||||
|
:markerstrokestyle, #Causes warning not to have it... what is this?
|
||||||
|
:fillcolor, :fillalpha, #:fillrange,
|
||||||
|
# :bins, :bar_width, :bar_edges, :bar_position,
|
||||||
|
:title, :title_location,
|
||||||
|
:window_title,
|
||||||
|
:guide, :lims, :scale, #:ticks, :flip, :rotation,
|
||||||
|
:titlefontfamily, :titlefontsize, :titlefontcolor,
|
||||||
|
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
||||||
|
:tickfontfamily, :tickfontsize, :tickfontcolor,
|
||||||
|
:guidefontfamily, :guidefontsize, :guidefontcolor,
|
||||||
|
:grid, :legend, #:colorbar,
|
||||||
|
# :marker_z,
|
||||||
|
# :line_z,
|
||||||
|
# :levels,
|
||||||
|
# :ribbon, :quiver, :arrow,
|
||||||
|
# :orientation,
|
||||||
|
:overwrite_figure,
|
||||||
|
:polar,
|
||||||
|
# :normalize, :weights,
|
||||||
|
# :contours, :aspect_ratio,
|
||||||
|
:match_dimensions,
|
||||||
|
# :clims,
|
||||||
|
# :inset_subplots,
|
||||||
|
:dpi,
|
||||||
|
# :colorbar_title,
|
||||||
|
])
|
||||||
|
const _inspectdr_style = [:auto, :solid, :dash, :dot, :dashdot]
|
||||||
|
const _inspectdr_seriestype = [
|
||||||
|
:path, :scatter, :shape, :straightline, #, :steppre, :steppost
|
||||||
|
]
|
||||||
|
#see: _allMarkers, _shape_keys
|
||||||
|
const _inspectdr_marker = Symbol[
|
||||||
|
:none, :auto,
|
||||||
|
:circle, :rect, :diamond,
|
||||||
|
:cross, :xcross,
|
||||||
|
:utriangle, :dtriangle, :rtriangle, :ltriangle,
|
||||||
|
:pentagon, :hexagon, :heptagon, :octagon,
|
||||||
|
:star4, :star5, :star6, :star7, :star8,
|
||||||
|
:vline, :hline, :+, :x,
|
||||||
|
]
|
||||||
|
|
||||||
|
const _inspectdr_scale = [:identity, :ln, :log2, :log10]
|
||||||
|
|||||||
@ -9,53 +9,7 @@ TODO
|
|||||||
* fix units in all visuals (e.g dotted lines, marker scale, surfaces)
|
* fix units in all visuals (e.g dotted lines, marker scale, surfaces)
|
||||||
=#
|
=#
|
||||||
|
|
||||||
const _glvisualize_attr = merge_with_base_supported([
|
|
||||||
:annotations,
|
|
||||||
:background_color_legend, :background_color_inside, :background_color_outside,
|
|
||||||
:foreground_color_grid, :foreground_color_legend, :foreground_color_title,
|
|
||||||
:foreground_color_axis, :foreground_color_border, :foreground_color_guide, :foreground_color_text,
|
|
||||||
:label,
|
|
||||||
:linecolor, :linestyle, :linewidth, :linealpha,
|
|
||||||
:markershape, :markercolor, :markersize, :markeralpha,
|
|
||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
|
||||||
:fillrange, :fillcolor, :fillalpha,
|
|
||||||
:bins, :bar_width, :bar_edges, :bar_position,
|
|
||||||
:title, :title_location,
|
|
||||||
:window_title,
|
|
||||||
:guide, :lims, :ticks, :scale, :flip, :rotation,
|
|
||||||
:titlefontsize, :titlefontcolor,
|
|
||||||
:legendfontsize, :legendfontcolor,
|
|
||||||
:tickfontsize,
|
|
||||||
:guidefontsize, :guidefontcolor,
|
|
||||||
:grid, :gridalpha, :gridstyle, :gridlinewidth,
|
|
||||||
:legend, :colorbar,
|
|
||||||
:marker_z,
|
|
||||||
:line_z,
|
|
||||||
:levels,
|
|
||||||
:ribbon, :quiver, :arrow,
|
|
||||||
:orientation,
|
|
||||||
:overwrite_figure,
|
|
||||||
#:polar,
|
|
||||||
:normalize, :weights,
|
|
||||||
:contours, :aspect_ratio,
|
|
||||||
:match_dimensions,
|
|
||||||
:clims,
|
|
||||||
:inset_subplots,
|
|
||||||
:dpi,
|
|
||||||
:hover,
|
|
||||||
:framestyle,
|
|
||||||
:tick_direction,
|
|
||||||
])
|
|
||||||
const _glvisualize_seriestype = [
|
|
||||||
:path, :shape, :straightline,
|
|
||||||
:scatter, :hexbin,
|
|
||||||
:bar, :boxplot,
|
|
||||||
:heatmap, :image, :volume,
|
|
||||||
:contour, :contour3d, :path3d, :scatter3d, :surface, :wireframe
|
|
||||||
]
|
|
||||||
const _glvisualize_style = [:auto, :solid, :dash, :dot, :dashdot]
|
|
||||||
const _glvisualize_marker = _allMarkers
|
|
||||||
const _glvisualize_scale = [:identity, :ln, :log2, :log10]
|
|
||||||
|
|
||||||
slice_arg(img::Matrix{C}, idx::Int) where {C<:Colorant} = img
|
slice_arg(img::Matrix{C}, idx::Int) where {C<:Colorant} = img
|
||||||
is_marker_supported(::GLVisualizeBackend, shape::GLVisualize.AllPrimitives) = true
|
is_marker_supported(::GLVisualizeBackend, shape::GLVisualize.AllPrimitives) = true
|
||||||
|
|||||||
@ -3,65 +3,6 @@
|
|||||||
|
|
||||||
# significant contributions by @jheinen
|
# significant contributions by @jheinen
|
||||||
|
|
||||||
const _gr_attr = merge_with_base_supported([
|
|
||||||
:annotations,
|
|
||||||
:background_color_legend, :background_color_inside, :background_color_outside,
|
|
||||||
:foreground_color_legend, :foreground_color_grid, :foreground_color_axis,
|
|
||||||
:foreground_color_text, :foreground_color_border,
|
|
||||||
:label,
|
|
||||||
:seriescolor, :seriesalpha,
|
|
||||||
:linecolor, :linestyle, :linewidth, :linealpha,
|
|
||||||
:markershape, :markercolor, :markersize, :markeralpha,
|
|
||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
|
||||||
:fillrange, :fillcolor, :fillalpha,
|
|
||||||
:bins,
|
|
||||||
:layout,
|
|
||||||
:title, :window_title,
|
|
||||||
:guide, :guide_position, :lims, :ticks, :scale, :flip,
|
|
||||||
:match_dimensions,
|
|
||||||
:titlefontfamily, :titlefontsize, :titlefonthalign, :titlefontvalign,
|
|
||||||
:titlefontrotation, :titlefontcolor,
|
|
||||||
:legendfontfamily, :legendfontsize, :legendfonthalign, :legendfontvalign,
|
|
||||||
:legendfontrotation, :legendfontcolor,
|
|
||||||
:tickfontfamily, :tickfontsize, :tickfonthalign, :tickfontvalign,
|
|
||||||
:tickfontrotation, :tickfontcolor,
|
|
||||||
:guidefontfamily, :guidefontsize, :guidefonthalign, :guidefontvalign,
|
|
||||||
:guidefontrotation, :guidefontcolor,
|
|
||||||
:grid, :gridalpha, :gridstyle, :gridlinewidth,
|
|
||||||
:legend, :legendtitle, :colorbar, :colorbar_title,
|
|
||||||
:fill_z, :line_z, :marker_z, :levels,
|
|
||||||
:ribbon, :quiver,
|
|
||||||
:orientation,
|
|
||||||
:overwrite_figure,
|
|
||||||
:polar,
|
|
||||||
:aspect_ratio,
|
|
||||||
:normalize, :weights,
|
|
||||||
:inset_subplots,
|
|
||||||
:bar_width,
|
|
||||||
:arrow,
|
|
||||||
:framestyle,
|
|
||||||
:tick_direction,
|
|
||||||
:camera,
|
|
||||||
:contour_labels,
|
|
||||||
])
|
|
||||||
const _gr_seriestype = [
|
|
||||||
:path, :scatter, :straightline,
|
|
||||||
:heatmap, :pie, :image,
|
|
||||||
:contour, :path3d, :scatter3d, :surface, :wireframe,
|
|
||||||
:shape
|
|
||||||
]
|
|
||||||
const _gr_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
|
||||||
const _gr_marker = _allMarkers
|
|
||||||
const _gr_scale = [:identity, :log10]
|
|
||||||
is_marker_supported(::GRBackend, shape::Shape) = true
|
|
||||||
|
|
||||||
function add_backend_string(::GRBackend)
|
|
||||||
"""
|
|
||||||
Pkg.add("GR")
|
|
||||||
Pkg.build("GR")
|
|
||||||
"""
|
|
||||||
end
|
|
||||||
|
|
||||||
import GR
|
import GR
|
||||||
export GR
|
export GR
|
||||||
|
|
||||||
|
|||||||
@ -62,47 +62,6 @@ const HDF5PLOT_SIMPLESUBSTRUCT = Union{Font, BoundingBox,
|
|||||||
|
|
||||||
#==
|
#==
|
||||||
===============================================================================#
|
===============================================================================#
|
||||||
|
|
||||||
const _hdf5_attr = merge_with_base_supported([
|
|
||||||
:annotations,
|
|
||||||
:background_color_legend, :background_color_inside, :background_color_outside,
|
|
||||||
:foreground_color_grid, :foreground_color_legend, :foreground_color_title,
|
|
||||||
:foreground_color_axis, :foreground_color_border, :foreground_color_guide, :foreground_color_text,
|
|
||||||
:label,
|
|
||||||
:linecolor, :linestyle, :linewidth, :linealpha,
|
|
||||||
:markershape, :markercolor, :markersize, :markeralpha,
|
|
||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
|
||||||
:fillrange, :fillcolor, :fillalpha,
|
|
||||||
:bins, :bar_width, :bar_edges, :bar_position,
|
|
||||||
:title, :title_location, :titlefont,
|
|
||||||
:window_title,
|
|
||||||
:guide, :lims, :ticks, :scale, :flip, :rotation,
|
|
||||||
:tickfont, :guidefont, :legendfont,
|
|
||||||
:grid, :legend, :colorbar,
|
|
||||||
:marker_z, :line_z, :fill_z,
|
|
||||||
:levels,
|
|
||||||
:ribbon, :quiver, :arrow,
|
|
||||||
:orientation,
|
|
||||||
:overwrite_figure,
|
|
||||||
:polar,
|
|
||||||
:normalize, :weights,
|
|
||||||
:contours, :aspect_ratio,
|
|
||||||
:match_dimensions,
|
|
||||||
:clims,
|
|
||||||
:inset_subplots,
|
|
||||||
:dpi,
|
|
||||||
:colorbar_title,
|
|
||||||
])
|
|
||||||
const _hdf5_seriestype = [
|
|
||||||
:path, :steppre, :steppost, :shape, :straightline,
|
|
||||||
:scatter, :hexbin, #:histogram2d, :histogram,
|
|
||||||
# :bar,
|
|
||||||
:heatmap, :pie, :image,
|
|
||||||
:contour, :contour3d, :path3d, :scatter3d, :surface, :wireframe
|
|
||||||
]
|
|
||||||
const _hdf5_style = [:auto, :solid, :dash, :dot, :dashdot]
|
|
||||||
const _hdf5_marker = vcat(_allMarkers, :pixel)
|
|
||||||
const _hdf5_scale = [:identity, :ln, :log2, :log10]
|
|
||||||
is_marker_supported(::HDF5Backend, shape::Shape) = true
|
is_marker_supported(::HDF5Backend, shape::Shape) = true
|
||||||
|
|
||||||
if length(HDF5PLOT_MAP_TELEM2STR) < 1
|
if length(HDF5PLOT_MAP_TELEM2STR) < 1
|
||||||
|
|||||||
@ -14,61 +14,6 @@ Add in functionality to Plots.jl:
|
|||||||
=#
|
=#
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
#TODO: remove features
|
|
||||||
const _inspectdr_attr = merge_with_base_supported([
|
|
||||||
:annotations,
|
|
||||||
:background_color_legend, :background_color_inside, :background_color_outside,
|
|
||||||
# :foreground_color_grid,
|
|
||||||
:foreground_color_legend, :foreground_color_title,
|
|
||||||
:foreground_color_axis, :foreground_color_border, :foreground_color_guide, :foreground_color_text,
|
|
||||||
:label,
|
|
||||||
:seriescolor, :seriesalpha,
|
|
||||||
:linecolor, :linestyle, :linewidth, :linealpha,
|
|
||||||
:markershape, :markercolor, :markersize, :markeralpha,
|
|
||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
|
||||||
:markerstrokestyle, #Causes warning not to have it... what is this?
|
|
||||||
:fillcolor, :fillalpha, #:fillrange,
|
|
||||||
# :bins, :bar_width, :bar_edges, :bar_position,
|
|
||||||
:title, :title_location,
|
|
||||||
:window_title,
|
|
||||||
:guide, :lims, :scale, #:ticks, :flip, :rotation,
|
|
||||||
:titlefontfamily, :titlefontsize, :titlefontcolor,
|
|
||||||
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
|
||||||
:tickfontfamily, :tickfontsize, :tickfontcolor,
|
|
||||||
:guidefontfamily, :guidefontsize, :guidefontcolor,
|
|
||||||
:grid, #:gridalpha, :gridstyle, :gridlinewidth, #alhpa & linewidth are per plot - not per subplot
|
|
||||||
:legend, #:legendtitle, :colorbar,
|
|
||||||
# :marker_z,
|
|
||||||
# :line_z,
|
|
||||||
# :levels,
|
|
||||||
# :ribbon, :quiver, :arrow,
|
|
||||||
# :orientation,
|
|
||||||
:overwrite_figure,
|
|
||||||
:polar,
|
|
||||||
# :normalize, :weights,
|
|
||||||
# :contours, :aspect_ratio,
|
|
||||||
:match_dimensions,
|
|
||||||
# :clims,
|
|
||||||
# :inset_subplots,
|
|
||||||
:dpi,
|
|
||||||
# :colorbar_title,
|
|
||||||
])
|
|
||||||
const _inspectdr_style = [:auto, :solid, :dash, :dot, :dashdot]
|
|
||||||
const _inspectdr_seriestype = [
|
|
||||||
:path, :scatter, :shape, :straightline, #, :steppre, :steppost
|
|
||||||
]
|
|
||||||
#see: _allMarkers, _shape_keys
|
|
||||||
const _inspectdr_marker = Symbol[
|
|
||||||
:none, :auto,
|
|
||||||
:circle, :rect, :diamond,
|
|
||||||
:cross, :xcross,
|
|
||||||
:utriangle, :dtriangle, :rtriangle, :ltriangle,
|
|
||||||
:pentagon, :hexagon, :heptagon, :octagon,
|
|
||||||
:star4, :star5, :star6, :star7, :star8,
|
|
||||||
:vline, :hline, :+, :x,
|
|
||||||
]
|
|
||||||
|
|
||||||
const _inspectdr_scale = [:identity, :ln, :log2, :log10]
|
|
||||||
|
|
||||||
is_marker_supported(::InspectDRBackend, shape::Shape) = true
|
is_marker_supported(::InspectDRBackend, shape::Shape) = true
|
||||||
|
|
||||||
|
|||||||
@ -2,47 +2,6 @@
|
|||||||
|
|
||||||
# significant contributions by: @pkofod
|
# significant contributions by: @pkofod
|
||||||
|
|
||||||
const _pgfplots_attr = merge_with_base_supported([
|
|
||||||
:annotations,
|
|
||||||
:background_color_legend,
|
|
||||||
:background_color_inside,
|
|
||||||
# :background_color_outside,
|
|
||||||
# :foreground_color_legend,
|
|
||||||
:foreground_color_grid, :foreground_color_axis,
|
|
||||||
:foreground_color_text, :foreground_color_border,
|
|
||||||
:label,
|
|
||||||
:seriescolor, :seriesalpha,
|
|
||||||
:linecolor, :linestyle, :linewidth, :linealpha,
|
|
||||||
:markershape, :markercolor, :markersize, :markeralpha,
|
|
||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha, :markerstrokestyle,
|
|
||||||
:fillrange, :fillcolor, :fillalpha,
|
|
||||||
:bins,
|
|
||||||
# :bar_width, :bar_edges,
|
|
||||||
:title,
|
|
||||||
# :window_title,
|
|
||||||
:guide, :guide_position, :lims, :ticks, :scale, :flip, :rotation,
|
|
||||||
:tickfont, :guidefont, :legendfont,
|
|
||||||
:grid, :legend,
|
|
||||||
:colorbar, :colorbar_title,
|
|
||||||
:fill_z, :line_z, :marker_z, :levels,
|
|
||||||
# :ribbon, :quiver, :arrow,
|
|
||||||
# :orientation,
|
|
||||||
# :overwrite_figure,
|
|
||||||
:polar,
|
|
||||||
# :normalize, :weights, :contours,
|
|
||||||
:aspect_ratio,
|
|
||||||
# :match_dimensions,
|
|
||||||
:tick_direction,
|
|
||||||
:framestyle,
|
|
||||||
:camera,
|
|
||||||
:contour_labels,
|
|
||||||
])
|
|
||||||
const _pgfplots_seriestype = [:path, :path3d, :scatter, :steppre, :stepmid, :steppost, :histogram2d, :ysticks, :xsticks, :contour, :shape, :straightline,]
|
|
||||||
const _pgfplots_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
|
||||||
const _pgfplots_marker = [:none, :auto, :circle, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star5, :pentagon, :hline] #vcat(_allMarkers, Shape)
|
|
||||||
const _pgfplots_scale = [:identity, :ln, :log2, :log10]
|
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------
|
||||||
|
|
||||||
const _pgfplots_linestyles = KW(
|
const _pgfplots_linestyles = KW(
|
||||||
|
|||||||
@ -1,60 +1,6 @@
|
|||||||
|
|
||||||
# https://plot.ly/javascript/getting-started
|
# https://plot.ly/javascript/getting-started
|
||||||
|
|
||||||
const _plotly_attr = merge_with_base_supported([
|
|
||||||
:annotations,
|
|
||||||
:background_color_legend, :background_color_inside, :background_color_outside,
|
|
||||||
:foreground_color_legend, :foreground_color_guide,
|
|
||||||
:foreground_color_grid, :foreground_color_axis,
|
|
||||||
:foreground_color_text, :foreground_color_border,
|
|
||||||
:foreground_color_title,
|
|
||||||
:label,
|
|
||||||
:seriescolor, :seriesalpha,
|
|
||||||
:linecolor, :linestyle, :linewidth, :linealpha,
|
|
||||||
:markershape, :markercolor, :markersize, :markeralpha,
|
|
||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha, :markerstrokestyle,
|
|
||||||
:fillrange, :fillcolor, :fillalpha,
|
|
||||||
:bins,
|
|
||||||
:title, :title_location,
|
|
||||||
:titlefontfamily, :titlefontsize, :titlefonthalign, :titlefontvalign,
|
|
||||||
:titlefontcolor,
|
|
||||||
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
|
||||||
:tickfontfamily, :tickfontsize, :tickfontcolor,
|
|
||||||
:guidefontfamily, :guidefontsize, :guidefontcolor,
|
|
||||||
:window_title,
|
|
||||||
:guide, :lims, :ticks, :scale, :flip, :rotation,
|
|
||||||
:tickfont, :guidefont, :legendfont,
|
|
||||||
:grid, :gridalpha, :gridlinewidth,
|
|
||||||
:legend, :colorbar, :colorbar_title,
|
|
||||||
:marker_z, :fill_z, :line_z, :levels,
|
|
||||||
:ribbon, :quiver,
|
|
||||||
:orientation,
|
|
||||||
# :overwrite_figure,
|
|
||||||
:polar,
|
|
||||||
:normalize, :weights,
|
|
||||||
# :contours,
|
|
||||||
:aspect_ratio,
|
|
||||||
:hover,
|
|
||||||
:inset_subplots,
|
|
||||||
:bar_width,
|
|
||||||
:clims,
|
|
||||||
:framestyle,
|
|
||||||
:tick_direction,
|
|
||||||
:camera,
|
|
||||||
:contour_labels,
|
|
||||||
])
|
|
||||||
|
|
||||||
const _plotly_seriestype = [
|
|
||||||
:path, :scatter, :pie, :heatmap,
|
|
||||||
:contour, :surface, :wireframe, :path3d, :scatter3d, :shape, :scattergl,
|
|
||||||
:straightline
|
|
||||||
]
|
|
||||||
const _plotly_style = [:auto, :solid, :dash, :dot, :dashdot]
|
|
||||||
const _plotly_marker = [
|
|
||||||
:none, :auto, :circle, :rect, :diamond, :utriangle, :dtriangle,
|
|
||||||
:cross, :xcross, :pentagon, :hexagon, :octagon, :vline, :hline
|
|
||||||
]
|
|
||||||
const _plotly_scale = [:identity, :log10]
|
|
||||||
is_subplot_supported(::PlotlyBackend) = true
|
is_subplot_supported(::PlotlyBackend) = true
|
||||||
# is_string_supported(::PlotlyBackend) = true
|
# is_string_supported(::PlotlyBackend) = true
|
||||||
const _plotly_framestyles = [:box, :axes, :zerolines, :grid, :none]
|
const _plotly_framestyles = [:box, :axes, :zerolines, :grid, :none]
|
||||||
|
|||||||
@ -1,18 +1,12 @@
|
|||||||
|
|
||||||
# https://github.com/spencerlyon2/PlotlyJS.jl
|
# https://github.com/spencerlyon2/PlotlyJS.jl
|
||||||
|
|
||||||
const _plotlyjs_attr = _plotly_attr
|
|
||||||
const _plotlyjs_seriestype = _plotly_seriestype
|
|
||||||
const _plotlyjs_style = _plotly_style
|
|
||||||
const _plotlyjs_marker = _plotly_marker
|
|
||||||
const _plotlyjs_scale = _plotly_scale
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
function _create_backend_figure(plt::Plot{PlotlyJSBackend})
|
function _create_backend_figure(plt::Plot{PlotlyJSBackend})
|
||||||
if !isplotnull() && plt[:overwrite_figure] && isa(current().o, PlotlyJS.SyncPlot)
|
if !isplotnull() && plt[:overwrite_figure] && isa(current().o, PlotlyJS.SyncPlot)
|
||||||
PlotlyJS.SyncPlot(PlotlyJS.Plot(), current().o.view)
|
PlotlyJS.SyncPlot(PlotlyJS.Plot(), options = current().o.options)
|
||||||
else
|
else
|
||||||
PlotlyJS.plot()
|
PlotlyJS.plot()
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,55 +1,6 @@
|
|||||||
|
|
||||||
# https://github.com/stevengj/PyPlot.jl
|
# https://github.com/stevengj/PyPlot.jl
|
||||||
|
|
||||||
const _pyplot_attr = merge_with_base_supported([
|
|
||||||
:annotations,
|
|
||||||
:background_color_legend, :background_color_inside, :background_color_outside,
|
|
||||||
:foreground_color_grid, :foreground_color_legend, :foreground_color_title,
|
|
||||||
:foreground_color_axis, :foreground_color_border, :foreground_color_guide, :foreground_color_text,
|
|
||||||
:label,
|
|
||||||
:linecolor, :linestyle, :linewidth, :linealpha,
|
|
||||||
:markershape, :markercolor, :markersize, :markeralpha,
|
|
||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
|
||||||
:fillrange, :fillcolor, :fillalpha,
|
|
||||||
:bins, :bar_width, :bar_edges, :bar_position,
|
|
||||||
:title, :title_location, :titlefont,
|
|
||||||
:window_title,
|
|
||||||
:guide, :guide_position, :lims, :ticks, :scale, :flip, :rotation,
|
|
||||||
:titlefontfamily, :titlefontsize, :titlefontcolor,
|
|
||||||
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
|
||||||
:tickfontfamily, :tickfontsize, :tickfontcolor,
|
|
||||||
:guidefontfamily, :guidefontsize, :guidefontcolor,
|
|
||||||
:grid, :gridalpha, :gridstyle, :gridlinewidth,
|
|
||||||
:legend, :legendtitle, :colorbar,
|
|
||||||
:marker_z, :line_z, :fill_z,
|
|
||||||
:levels,
|
|
||||||
:ribbon, :quiver, :arrow,
|
|
||||||
:orientation,
|
|
||||||
:overwrite_figure,
|
|
||||||
:polar,
|
|
||||||
:normalize, :weights,
|
|
||||||
:contours, :aspect_ratio,
|
|
||||||
:match_dimensions,
|
|
||||||
:clims,
|
|
||||||
:inset_subplots,
|
|
||||||
:dpi,
|
|
||||||
:colorbar_title,
|
|
||||||
:stride,
|
|
||||||
:framestyle,
|
|
||||||
:tick_direction,
|
|
||||||
:camera,
|
|
||||||
:contour_labels,
|
|
||||||
])
|
|
||||||
const _pyplot_seriestype = [
|
|
||||||
:path, :steppre, :steppost, :shape, :straightline,
|
|
||||||
:scatter, :hexbin, #:histogram2d, :histogram,
|
|
||||||
# :bar,
|
|
||||||
:heatmap, :pie, :image,
|
|
||||||
:contour, :contour3d, :path3d, :scatter3d, :surface, :wireframe
|
|
||||||
]
|
|
||||||
const _pyplot_style = [:auto, :solid, :dash, :dot, :dashdot]
|
|
||||||
const _pyplot_marker = vcat(_allMarkers, :pixel)
|
|
||||||
const _pyplot_scale = [:identity, :ln, :log2, :log10]
|
|
||||||
is_marker_supported(::PyPlotBackend, shape::Shape) = true
|
is_marker_supported(::PyPlotBackend, shape::Shape) = true
|
||||||
|
|
||||||
|
|
||||||
@ -1064,7 +1015,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
ticks = sp[:framestyle] == :none ? nothing : get_ticks(axis)
|
ticks = sp[:framestyle] == :none ? nothing : get_ticks(axis)
|
||||||
# don't show the 0 tick label for the origin framestyle
|
# don't show the 0 tick label for the origin framestyle
|
||||||
if sp[:framestyle] == :origin && length(ticks) > 1
|
if sp[:framestyle] == :origin && length(ticks) > 1
|
||||||
ticks[2][ticks[1] .== 0] = ""
|
ticks[2][ticks[1] .== 0] .= ""
|
||||||
end
|
end
|
||||||
axis[:ticks] != :native ? py_set_ticks(ax, ticks, letter) : nothing
|
axis[:ticks] != :native ? py_set_ticks(ax, ticks, letter) : nothing
|
||||||
pyaxis[:set_tick_params](direction = axis[:tick_direction] == :out ? "out" : "in")
|
pyaxis[:set_tick_params](direction = axis[:tick_direction] == :out ? "out" : "in")
|
||||||
|
|||||||
@ -1,28 +1,6 @@
|
|||||||
|
|
||||||
# https://github.com/Evizero/UnicodePlots.jl
|
# https://github.com/Evizero/UnicodePlots.jl
|
||||||
|
|
||||||
const _unicodeplots_attr = merge_with_base_supported([
|
|
||||||
:label,
|
|
||||||
:legend,
|
|
||||||
:seriescolor,
|
|
||||||
:seriesalpha,
|
|
||||||
:linestyle,
|
|
||||||
:markershape,
|
|
||||||
:bins,
|
|
||||||
:title,
|
|
||||||
:guide, :lims,
|
|
||||||
])
|
|
||||||
const _unicodeplots_seriestype = [
|
|
||||||
:path, :scatter, :straightline,
|
|
||||||
# :bar,
|
|
||||||
:shape,
|
|
||||||
:histogram2d,
|
|
||||||
:spy
|
|
||||||
]
|
|
||||||
const _unicodeplots_style = [:auto, :solid]
|
|
||||||
const _unicodeplots_marker = [:none, :auto, :circle]
|
|
||||||
const _unicodeplots_scale = [:identity]
|
|
||||||
|
|
||||||
|
|
||||||
# don't warn on unsupported... there's just too many warnings!!
|
# don't warn on unsupported... there's just too many warnings!!
|
||||||
warnOnUnsupported_args(::UnicodePlotsBackend, plotattributes::KW) = nothing
|
warnOnUnsupported_args(::UnicodePlotsBackend, plotattributes::KW) = nothing
|
||||||
|
|||||||
@ -437,6 +437,15 @@ each line segment or marker in the plot.
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Some constants for PlotDocs and PlotReferenceImages
|
||||||
|
_animation_examples = [2, 30]
|
||||||
|
_backend_skips = Dict(
|
||||||
|
:gr => [25, 30],
|
||||||
|
:pyplot => [25, 30],
|
||||||
|
:plotlyjs => [2, 21, 25, 30, 31],
|
||||||
|
:pgfplots => [2, 5, 6, 10, 16, 20, 22, 23, 25, 28, 30],
|
||||||
|
)
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------------
|
||||||
|
|
||||||
# make and display one plot
|
# make and display one plot
|
||||||
|
|||||||
25
src/init.jl
25
src/init.jl
@ -84,6 +84,7 @@ function __init__()
|
|||||||
ENV["MPLBACKEND"] = "Agg"
|
ENV["MPLBACKEND"] = "Agg"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if haskey(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL")
|
if haskey(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL")
|
||||||
use_local = ENV["PLOTS_HOST_DEPENDENCY_LOCAL"] == "true"
|
use_local = ENV["PLOTS_HOST_DEPENDENCY_LOCAL"] == "true"
|
||||||
use_local_dependencies[] = isfile(plotly_local_file_path) && use_local
|
use_local_dependencies[] = isfile(plotly_local_file_path) && use_local
|
||||||
@ -93,4 +94,28 @@ function __init__()
|
|||||||
else
|
else
|
||||||
use_local_dependencies[] = use_local
|
use_local_dependencies[] = use_local
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# A backup, if no PNG generation is defined, is to try to make a PDF and use FileIO to convert
|
||||||
|
@require FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" begin
|
||||||
|
PDFBackends = Union{PGFPlotsBackend,PlotlyJSBackend,PyPlotBackend,InspectDRBackend,GRBackend}
|
||||||
|
function _show(io::IO, ::MIME"image/png", plt::Plot{<:PDFBackends})
|
||||||
|
fn = tempname()
|
||||||
|
|
||||||
|
# first save a pdf file
|
||||||
|
pdf(plt, fn)
|
||||||
|
|
||||||
|
# load that pdf into a FileIO Stream
|
||||||
|
s = FileIO.load(fn * ".pdf")
|
||||||
|
|
||||||
|
# save a png
|
||||||
|
pngfn = fn * ".png"
|
||||||
|
FileIO.save(pngfn, s)
|
||||||
|
|
||||||
|
# now write from the file
|
||||||
|
write(io, read(open(pngfn), String))
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -210,30 +210,6 @@ _show(io::IO, ::MIME{Symbol("text/plain")}, plt::Plot) = show(io, plt)
|
|||||||
closeall() = closeall(backend())
|
closeall() = closeall(backend())
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
|
||||||
# A backup, if no PNG generation is defined, is to try to make a PDF and use FileIO to convert
|
|
||||||
|
|
||||||
const PDFBackends = Union{PGFPlotsBackend,PlotlyJSBackend,PyPlotBackend,InspectDRBackend,GRBackend}
|
|
||||||
if is_installed("FileIO")
|
|
||||||
@eval import FileIO
|
|
||||||
function _show(io::IO, ::MIME"image/png", plt::Plot{<:PDFBackends})
|
|
||||||
fn = tempname()
|
|
||||||
|
|
||||||
# first save a pdf file
|
|
||||||
pdf(plt, fn)
|
|
||||||
|
|
||||||
# load that pdf into a FileIO Stream
|
|
||||||
s = FileIO.load(fn * ".pdf")
|
|
||||||
|
|
||||||
# save a png
|
|
||||||
pngfn = fn * ".png"
|
|
||||||
FileIO.save(pngfn, s)
|
|
||||||
|
|
||||||
# now write from the file
|
|
||||||
write(io, read(open(pngfn), String))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# function html_output_format(fmt)
|
# function html_output_format(fmt)
|
||||||
# if fmt == "png"
|
# if fmt == "png"
|
||||||
# @eval function Base.show(io::IO, ::MIME"text/html", plt::Plot)
|
# @eval function Base.show(io::IO, ::MIME"text/html", plt::Plot)
|
||||||
|
|||||||
@ -412,14 +412,6 @@ end
|
|||||||
isijulia() = :IJulia in nameof.(collect(values(Base.loaded_modules)))
|
isijulia() = :IJulia in nameof.(collect(values(Base.loaded_modules)))
|
||||||
isatom() = :Atom in nameof.(collect(values(Base.loaded_modules)))
|
isatom() = :Atom in nameof.(collect(values(Base.loaded_modules)))
|
||||||
|
|
||||||
function is_installed(pkgstr::AbstractString)
|
|
||||||
try
|
|
||||||
Pkg.installed(pkgstr) === nothing ? false : true
|
|
||||||
catch
|
|
||||||
false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
istuple(::Tuple) = true
|
istuple(::Tuple) = true
|
||||||
istuple(::Any) = false
|
istuple(::Any) = false
|
||||||
isvector(::AVec) = true
|
isvector(::AVec) = true
|
||||||
|
|||||||
@ -4,7 +4,6 @@ using Pkg
|
|||||||
# ENV["PYTHON"] = ""
|
# ENV["PYTHON"] = ""
|
||||||
|
|
||||||
to_add = [
|
to_add = [
|
||||||
PackageSpec(url="https://github.com/JuliaPlots/PlotReferenceImages.jl.git"),
|
|
||||||
# PackageSpec(url="https://github.com/JuliaStats/KernelDensity.jl.git"),
|
# PackageSpec(url="https://github.com/JuliaStats/KernelDensity.jl.git"),
|
||||||
PackageSpec(name="PlotUtils", rev="master"),
|
PackageSpec(name="PlotUtils", rev="master"),
|
||||||
PackageSpec(name="RecipesBase", rev="master"),
|
PackageSpec(name="RecipesBase", rev="master"),
|
||||||
@ -17,12 +16,24 @@ to_add = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
if isinteractive()
|
if isinteractive()
|
||||||
|
Pkg.develop(PackageSpec(url="https://github.com/JuliaPlots/PlotReferenceImages.jl.git"))
|
||||||
append!(to_add, [
|
append!(to_add, [
|
||||||
PackageSpec(name="FileIO"),
|
PackageSpec(name="FileIO"),
|
||||||
PackageSpec(name="ImageMagick"),
|
PackageSpec(name="ImageMagick"),
|
||||||
PackageSpec(name="UnicodePlots"),
|
PackageSpec(name="UnicodePlots"),
|
||||||
PackageSpec(name="VisualRegressionTests"),
|
PackageSpec(name="VisualRegressionTests"),
|
||||||
|
PackageSpec(name="Gtk"),
|
||||||
|
# PlotlyJS:
|
||||||
|
# PackageSpec(name="PlotlyJS"),
|
||||||
|
# PackageSpec(name="Blink"),
|
||||||
|
# PackageSpec(name="ORCA"),
|
||||||
|
# PyPlot:
|
||||||
|
# PackageSpec(name="PyPlot"),
|
||||||
|
# PackageSpec(name="PyCall"),
|
||||||
|
# PackageSpec(name="LaTeXStrings"),
|
||||||
])
|
])
|
||||||
|
else
|
||||||
|
push!(to_add, PackageSpec(url="https://github.com/JuliaPlots/PlotReferenceImages.jl.git"))
|
||||||
end
|
end
|
||||||
|
|
||||||
Pkg.add(to_add)
|
Pkg.add(to_add)
|
||||||
|
|||||||
@ -29,7 +29,7 @@ default(size=(500,300))
|
|||||||
# TODO: use julia's Condition type and the wait() and notify() functions to initialize a Window, then wait() on a condition that
|
# TODO: use julia's Condition type and the wait() and notify() functions to initialize a Window, then wait() on a condition that
|
||||||
# is referenced in a button press callback (the button clicked callback will call notify() on that condition)
|
# is referenced in a button press callback (the button clicked callback will call notify() on that condition)
|
||||||
|
|
||||||
const _current_plots_version = v"0.20.3"
|
import Plots._current_plots_version
|
||||||
|
|
||||||
|
|
||||||
function image_comparison_tests(pkg::Symbol, idx::Int; debug = false, popup = isinteractive(), sigma = [1,1], tol = 1e-2)
|
function image_comparison_tests(pkg::Symbol, idx::Int; debug = false, popup = isinteractive(), sigma = [1,1], tol = 1e-2)
|
||||||
|
|||||||
@ -14,16 +14,19 @@ img_tol = isinteractive() ? 1e-2 : 10e-2
|
|||||||
@test gr() == Plots.GRBackend()
|
@test gr() == Plots.GRBackend()
|
||||||
@test backend() == Plots.GRBackend()
|
@test backend() == Plots.GRBackend()
|
||||||
|
|
||||||
image_comparison_facts(:gr, tol=img_tol, skip = [25, 30])
|
@static if Sys.islinux()
|
||||||
|
image_comparison_facts(:gr, tol=img_tol, skip = [25, 30])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @static if isinteractive()
|
||||||
#@testset "PyPlot" begin
|
# @testset "PyPlot" begin
|
||||||
# @test pyplot() == Plots.PyPlotBackend()
|
# @test pyplot() == Plots.PyPlotBackend()
|
||||||
# @test backend() == Plots.PyPlotBackend()
|
# @test backend() == Plots.PyPlotBackend()
|
||||||
#
|
#
|
||||||
# image_comparison_facts(:pyplot, tol=img_tol)
|
# image_comparison_facts(:pyplot, tol=img_tol, skip = [2, 25, 30, 31])
|
||||||
#end
|
# end
|
||||||
|
# end
|
||||||
|
|
||||||
@testset "UnicodePlots" begin
|
@testset "UnicodePlots" begin
|
||||||
@test unicodeplots() == Plots.UnicodePlotsBackend()
|
@test unicodeplots() == Plots.UnicodePlotsBackend()
|
||||||
@ -36,22 +39,23 @@ end
|
|||||||
# The plotlyjs testimages return a connection error on travis:
|
# The plotlyjs testimages return a connection error on travis:
|
||||||
# connect: connection refused (ECONNREFUSED)
|
# connect: connection refused (ECONNREFUSED)
|
||||||
|
|
||||||
# @testset "PlotlyJS" begin
|
# @static if isinteractive()
|
||||||
# @test plotlyjs() == Plots.PlotlyJSBackend()
|
# @testset "PlotlyJS" begin
|
||||||
# @test backend() == Plots.PlotlyJSBackend()
|
# @test plotlyjs() == Plots.PlotlyJSBackend()
|
||||||
|
# @test backend() == Plots.PlotlyJSBackend()
|
||||||
#
|
#
|
||||||
# if Sys.islinux() && isinteractive()
|
|
||||||
# image_comparison_facts(:plotlyjs,
|
# image_comparison_facts(:plotlyjs,
|
||||||
# skip=[
|
# skip=[
|
||||||
# 2, # animation (skipped for speed)
|
# 2, # animation (skipped for speed)
|
||||||
|
# 25,
|
||||||
# 27, # (polar plots) takes very long / not working
|
# 27, # (polar plots) takes very long / not working
|
||||||
|
# 30,
|
||||||
# 31, # animation (skipped for speed)
|
# 31, # animation (skipped for speed)
|
||||||
# ],
|
# ],
|
||||||
# tol=img_tol)
|
# tol=img_tol)
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
|
||||||
# InspectDR returns that error on travis:
|
# InspectDR returns that error on travis:
|
||||||
# ERROR: LoadError: InitError: Cannot open display:
|
# ERROR: LoadError: InitError: Cannot open display:
|
||||||
# in Gtk.GLib.GError(::Gtk.##229#230) at /home/travis/.julia/v0.5/Gtk/src/GLib/gerror.jl:17
|
# in Gtk.GLib.GError(::Gtk.##229#230) at /home/travis/.julia/v0.5/Gtk/src/GLib/gerror.jl:17
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user