diff --git a/src/Plots.jl b/src/Plots.jl index ac99a187..d63282f9 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -294,19 +294,4 @@ end const CURRENT_BACKEND = CurrentBackend(:none) -# for compatibility with Requires.jl: -@init begin - if isdefined(Main, :PLOTS_DEFAULTS) - if haskey(Main.PLOTS_DEFAULTS, :theme) - theme(Main.PLOTS_DEFAULTS[:theme]) - end - for (k,v) in Main.PLOTS_DEFAULTS - k == :theme || default(k, v) - end - end - pushdisplay(PlotsDisplay()) -end - -# --------------------------------------------------------- - end # module diff --git a/src/init.jl b/src/init.jl index 53f5898b..51865535 100644 --- a/src/init.jl +++ b/src/init.jl @@ -1,4 +1,14 @@ function __init__() + if isdefined(Main, :PLOTS_DEFAULTS) + if haskey(Main.PLOTS_DEFAULTS, :theme) + theme(Main.PLOTS_DEFAULTS[:theme]) + end + for (k,v) in Main.PLOTS_DEFAULTS + k == :theme || default(k, v) + end + end + pushdisplay(PlotsDisplay()) + include(joinpath(@__DIR__, "backends", "plotly.jl")) include(joinpath(@__DIR__, "backends", "gr.jl")) include(joinpath(@__DIR__, "backends", "web.jl"))