diff --git a/src/recipes.jl b/src/recipes.jl index 4c29a1ac..8ff2fa64 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -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) diff --git a/test/test_recipes.jl b/test/test_recipes.jl index f03a7d2a..3c5718a4 100644 --- a/test/test_recipes.jl +++ b/test/test_recipes.jl @@ -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