fix axis agruments in PLOTS_DEFAULTS

This commit is contained in:
Daniel Schwabeneder 2020-04-10 16:04:17 +02:00
parent 5da2d85420
commit bbdf1dcc0e

View File

@ -3,7 +3,7 @@ using REPL
function _plots_defaults() function _plots_defaults()
if isdefined(Main, :PLOTS_DEFAULTS) if isdefined(Main, :PLOTS_DEFAULTS)
Dict{Symbol,Any}(Main.PLOTS_DEFAULTS) copy(Dict{Symbol,Any}(Main.PLOTS_DEFAULTS))
else else
Dict{Symbol,Any}() Dict{Symbol,Any}()
end end
@ -13,11 +13,9 @@ end
function __init__() function __init__()
user_defaults = _plots_defaults() user_defaults = _plots_defaults()
if haskey(user_defaults, :theme) if haskey(user_defaults, :theme)
theme(user_defaults[:theme]) theme(pop!(user_defaults, :theme))
end
for (k,v) in user_defaults
k == :theme || default(k, v)
end end
default(; user_defaults...)
insert!(Base.Multimedia.displays, findlast(x -> x isa Base.TextDisplay || x isa REPL.REPLDisplay, Base.Multimedia.displays) + 1, PlotsDisplay()) insert!(Base.Multimedia.displays, findlast(x -> x isa Base.TextDisplay || x isa REPL.REPLDisplay, Base.Multimedia.displays) + 1, PlotsDisplay())