From 0458c18c133812ddd08364d56387bc9224e7c521 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Fri, 29 Nov 2019 16:27:57 +0100 Subject: [PATCH] require PlotThemes v1 --- Project.toml | 2 +- src/themes.jl | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Project.toml b/Project.toml index 0b76a8ef..55b71f8b 100644 --- a/Project.toml +++ b/Project.toml @@ -39,7 +39,7 @@ GeometryTypes = "0.7" JSON = "0.21" Measures = "0.3" NaNMath = "0.3" -PlotThemes = "0.2, 1" +PlotThemes = "1" PlotUtils = "0.6.1" RecipesBase = "0.6, 0.7" Reexport = "0.2" diff --git a/src/themes.jl b/src/themes.jl index eaa69636..aed8ecc0 100644 --- a/src/themes.jl +++ b/src/themes.jl @@ -13,7 +13,6 @@ function _theme(s::Symbol, defaults::KW; kw...) reset_defaults() # Set the theme's gradient as default - fix_colorgradient!(defaults) if haskey(defaults, :colorgradient) PlotUtils.clibrary(:misc) PlotUtils.default_cgrad(default = :sequential, sequential = PlotThemes.gradient_name(s)) @@ -41,13 +40,6 @@ function _theme(s::Symbol, defaults::KW; kw...) return end -# be compatible with old PlotThemes specifying the colorgradient with `:gradient` -function fix_colorgradient!(defaults) - if haskey(defaults, :gradient) && !haskey(defaults, :colorgradient) - defaults[:colorgradient] = pop!(defaults, :gradient) - end -end - @deprecate set_theme(s) theme(s) @userplot ShowTheme @@ -65,7 +57,6 @@ _get_showtheme_args(thm::Symbol, func::Symbol) = thm, get(_color_functions, func defaults = PlotThemes._themes[thm].defaults # get the gradient - fix_colorgradient!(defaults) gradient_colors = get(defaults, :colorgradient, cgrad(:inferno).colors) colorgradient = cgrad(cfunc.(RGB.(gradient_colors)))