deprecated gadfly/immerse

This commit is contained in:
Thomas Breloff 2016-05-24 14:46:53 -04:00
parent c1baca181c
commit 300babd6b1
2 changed files with 23 additions and 15 deletions

View File

@ -137,13 +137,21 @@ end
Set the plot backend.
"""
function backend(pkg::AbstractBackend)
CURRENT_BACKEND.sym = backend_name(pkg)
CURRENT_BACKEND.pkg = pkg
CURRENT_BACKEND.sym = backend_name(pkg)
warn_on_deprecated_backend(CURRENT_BACKEND.sym)
CURRENT_BACKEND.pkg = pkg
end
function backend(modname::Symbol)
CURRENT_BACKEND.sym = modname
CURRENT_BACKEND.pkg = _backend_instance(modname)
warn_on_deprecated_backend(modname)
CURRENT_BACKEND.sym = modname
CURRENT_BACKEND.pkg = _backend_instance(modname)
end
function warn_on_deprecated_backend(bsym::Symbol)
if bsym in (:qwt, :winston, :bokeh, :gadfly, :immerse)
warn("Backend $bsym has been deprecated. It may not work as originally intended.")
end
end
# ---------------------------------------------------------

View File

@ -7,17 +7,17 @@ srand(1234)
default(show=false, reuse=true)
img_eps = 5e-2
facts("Gadfly") do
@fact gadfly() --> Plots.GadflyBackend()
@fact backend() --> Plots.GadflyBackend()
@fact typeof(plot(1:10)) --> Plots.Plot{Plots.GadflyBackend}
@fact plot(Int[1,2,3], rand(3)) --> not(nothing)
@fact plot(sort(rand(10)), rand(Int, 10, 3)) --> not(nothing)
@fact plot!(rand(10,3), rand(10,3)) --> not(nothing)
image_comparison_facts(:gadfly, skip=[4,6,23,24,27], eps=img_eps)
end
# facts("Gadfly") do
# @fact gadfly() --> Plots.GadflyBackend()
# @fact backend() --> Plots.GadflyBackend()
#
# @fact typeof(plot(1:10)) --> Plots.Plot{Plots.GadflyBackend}
# @fact plot(Int[1,2,3], rand(3)) --> not(nothing)
# @fact plot(sort(rand(10)), rand(Int, 10, 3)) --> not(nothing)
# @fact plot!(rand(10,3), rand(10,3)) --> not(nothing)
#
# image_comparison_facts(:gadfly, skip=[4,6,23,24,27], eps=img_eps)
# end
facts("PyPlot") do
@fact pyplot() --> Plots.PyPlotBackend()