Skip to content

Commit 2f2a5f4

Browse files
make Plots relocatable again (#5200)
* make Plots relocatable again * Update src/backends.jl Co-authored-by: Simon Christ <SimonChrist@gmx.de> --------- Co-authored-by: Simon Christ <SimonChrist@gmx.de>
1 parent 342b327 commit 2f2a5f4

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

src/backends.jl

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,23 @@ function _check_compat(m::Module; warn = true)
5757
return nothing
5858
end
5959

60-
_path(sym::Symbol) =
61-
if sym (:pgfplots, :pyplot)
62-
@path joinpath(@__DIR__, "backends", "deprecated", "$sym.jl")
63-
else
64-
@path joinpath(@__DIR__, "backends", "$sym.jl")
65-
end
60+
const _backend_paths = Dict{Symbol, RelocatableFolders.Path}(
61+
:gaston => @path(joinpath(@__DIR__, "backends", "gaston.jl")),
62+
:gr => @path(joinpath(@__DIR__, "backends", "gr.jl")),
63+
:hdf5 => @path(joinpath(@__DIR__, "backends", "hdf5.jl")),
64+
:inspectdr => @path(joinpath(@__DIR__, "backends", "inspectdr.jl")),
65+
:pgfplotsx => @path(joinpath(@__DIR__, "backends", "pgfplotsx.jl")),
66+
:plotly => @path(joinpath(@__DIR__, "backends", "plotly.jl")),
67+
:plotlybase => @path(joinpath(@__DIR__, "backends", "plotlybase.jl")),
68+
:plotlyjs => @path(joinpath(@__DIR__, "backends", "plotlyjs.jl")),
69+
:pythonplot => @path(joinpath(@__DIR__, "backends", "pythonplot.jl")),
70+
:unicodeplots => @path(joinpath(@__DIR__, "backends", "unicodeplots.jl")),
71+
# Deprecated backends
72+
:pgfplots => @path(joinpath(@__DIR__, "backends", "deprecated", "pgfplots.jl")),
73+
:pyplot => @path(joinpath(@__DIR__, "backends", "deprecated", "pyplot.jl")),
74+
)
75+
76+
_path(sym::Symbol) = _backend_paths[sym]
6677

6778
"Returns a list of supported backends"
6879
backends() = _backends

0 commit comments

Comments
 (0)