fix attributes passing

This commit is contained in:
Simon Christ 2020-10-16 16:21:14 +02:00
parent 7fe6a69a21
commit 3db7674ecb
2 changed files with 3 additions and 2 deletions

View File

@ -1007,7 +1007,7 @@ export lens!
# add subplot
for series in sp.series_list
@series begin
plotattributes = merge(plotattributes, copy(series.plotattributes))
plotattributes = merge(backup, copy(series.plotattributes))
subplot := lens_index
primary := false
xlims := (x1, x2)

View File

@ -1,8 +1,9 @@
using Plots, Test
@testset "lens!" begin
pl = plot(1:5)
lens!(pl, [1,2], [1,2], inset = (1, bbox(0.0,0.0,0.2,0.2)))
lens!(pl, [1,2], [1,2], inset = (1, bbox(0.0,0.0,0.2,0.2)), colorbar = false)
@test length(pl.series_list) == 4
@test pl[2][:colorbar] == :none
end # testset
@testset "vline, vspan" begin