deprecate pgfplots (#2711)

* deprecate pgfplots

* Update backends.jl

* Update backends.jl

* Rename src/backends/pgfplots.jl to src/backends/deprecated/pgfplots.jl

* Update init.jl
This commit is contained in:
Simon Christ 2020-05-19 13:03:54 +02:00 committed by GitHub
parent d8f4519b0c
commit 2f9ce790e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -190,13 +190,17 @@ function backend(sym::Symbol)
end end
end end
const _deprecated_backends = [:qwt, :winston, :bokeh, :gadfly, :immerse, :glvisualize] const _deprecated_backends = [:qwt, :winston, :bokeh, :gadfly, :immerse, :glvisualize, :pgfplots]
function warn_on_deprecated_backend(bsym::Symbol) function warn_on_deprecated_backend(bsym::Symbol)
if bsym in _deprecated_backends if bsym in _deprecated_backends
if bsym == :pgfplots
@warn("Backend $bsym has been deprecated. Use pgfplotsx instead.")
else
@warn("Backend $bsym has been deprecated.") @warn("Backend $bsym has been deprecated.")
end end
end end
end

View File

@ -39,7 +39,7 @@ function __init__()
end end
@require PGFPlots = "3b7a836e-365b-5785-a47d-02c71176b4aa" begin @require PGFPlots = "3b7a836e-365b-5785-a47d-02c71176b4aa" begin
fn = joinpath(@__DIR__, "backends", "pgfplots.jl") fn = joinpath(@__DIR__, "backends", "deprecated", "pgfplots.jl")
include(fn) include(fn)
@require Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" Revise.track(Plots, fn) @require Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" Revise.track(Plots, fn)
end end