add z_order (#4139)

* add z_order

* format

* add missing ,

* fix testss

* this time for real

* format [skip ci]
This commit is contained in:
Simon Christ
2022-03-11 15:57:06 +01:00
committed by GitHub
parent b60cf3cc53
commit 1520705fa7
6 changed files with 24 additions and 1 deletions
+1
View File
@@ -38,6 +38,7 @@ end
end
for fn in (
"test_args.jl",
"test_defaults.jl",
"test_pipeline.jl",
"test_axes.jl",
+10
View File
@@ -0,0 +1,10 @@
using Plots, Test
@testset "Series Attributes" begin
pl = plot([[1, 2, 3], [2, 3, 4]], lw = 5)
@test hline!(deepcopy(pl), [1.75])[1].series_list[3][:label] ==
hline!(deepcopy(pl), [1.75], z_order = :front)[1].series_list[3][:label] ==
"y3"
@test hline!(deepcopy(pl), [1.75], z_order = :back)[1].series_list[1][:label] == "y3"
@test hline!(deepcopy(pl), [1.75], z_order = 2)[1].series_list[2][:label] == "y3"
end