Compare commits

...

8 Commits

Author SHA1 Message Date
Simon Christ
cc3ce91bec
Update test_defaults.jl 2020-10-12 15:45:32 +02:00
Simon Christ
68c7d53dcd
Update test_defaults.jl 2020-10-12 15:26:41 +02:00
Simon Christ
8d37ae1f32
Update test_defaults.jl 2020-10-12 15:17:03 +02:00
Simon Christ
f77a4bc9b3
Update test_defaults.jl 2020-10-12 15:05:47 +02:00
Simon Christ
54f29f283e
Update test_defaults.jl 2020-10-12 14:05:44 +02:00
Simon Christ
d805cc0b54
Update runtests.jl 2020-10-12 14:04:27 +02:00
Simon Christ
86d153fb25
Create test_defaults.jl 2020-10-12 14:03:16 +02:00
Simon Christ
eea8ac6d13
Fix loading of themes
Fix #3053 

Needs test
2020-10-12 13:58:17 +02:00
3 changed files with 15 additions and 2 deletions

View File

@ -15,9 +15,10 @@ end
function __init__() function __init__()
user_defaults = _plots_defaults() user_defaults = _plots_defaults()
if haskey(user_defaults, :theme) if haskey(user_defaults, :theme)
theme(pop!(user_defaults, :theme)) theme(pop!(user_defaults, :theme); user_defaults...)
else
default(; user_defaults...)
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())

View File

@ -11,6 +11,7 @@ import GeometryTypes, GeometryBasics
using Dates using Dates
using RecipesBase using RecipesBase
include("test_defaults.jl")
include("test_axes.jl") include("test_axes.jl")
include("test_axis_letter.jl") include("test_axis_letter.jl")
include("test_recipes.jl") include("test_recipes.jl")

11
test/test_defaults.jl Normal file
View File

@ -0,0 +1,11 @@
using Plots, Test
const PLOTS_DEFAULTS = Dict(:theme => :wong2)
Plots.__init__()
@testset "Loading theme" begin
@test plot(1:5)[1][1][:seriescolor] == RGBA(colorant"black")
end
empty!(PLOTS_DEFAULTS)
Plots.__init__()