fix attributes passing (#3073)

This commit is contained in:
Simon Christ 2020-10-16 16:58:35 +02:00 committed by GitHub
parent 7fe6a69a21
commit 015b48eede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

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

View File

@ -1,8 +1,9 @@
using Plots, Test using Plots, Test
@testset "lens!" begin @testset "lens!" begin
pl = plot(1:5) 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 length(pl.series_list) == 4
@test pl[2][:colorbar] == :none
end # testset end # testset
@testset "vline, vspan" begin @testset "vline, vspan" begin