detect aliases in recipes (#3904)

* detect aliases in recipes

* remove doubled tests
This commit is contained in:
Simon Christ
2021-10-28 16:12:59 +02:00
committed by GitHub
parent 1c621feacc
commit e84905c2a0
2 changed files with 19 additions and 17 deletions
+12
View File
@@ -1,6 +1,18 @@
using Plots, Test
using OffsetArrays
@testset "User recipes" begin
struct LegendPlot end
@recipe function f(plot::LegendPlot)
legend --> :topleft
(1:3, 1:3)
end
pl = plot(LegendPlot(); legend = :right)
@test pl[1][:legend_position] == :right
pl = plot(LegendPlot())
@test pl[1][:legend_position] == :topleft
end
@testset "lens!" begin
pl = plot(1:5)
lens!(pl, [1, 2], [1, 2], inset = (1, bbox(0.0, 0.0, 0.2, 0.2)), colorbar = false)