Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastyBlacksmith committed May 23, 2024
1 parent 3bf9935 commit 60b319b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ end

@recipe function f(s::Series)
for (k, v) in s.plotattributes
k == :subplot && continue
k in (:subplot, :yerror, :xerror, :zerror) && continue
plotattributes[k] = v
end
()
Expand Down
7 changes: 7 additions & 0 deletions test/test_recipes.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
using OffsetArrays

@testset "Series" begin
pl = plot(1:3, yerror = 1)
@test plot(pl[1][1])[1][1][:primary] == true
@test plot(pl[1][2])[1][1][:primary] == false
@test isequal(plot(pl[1][2])[1][1][:y], pl[1][2][:y])
end

@testset "User recipes" begin
struct LegendPlot end
@recipe function f(plot::LegendPlot)
Expand Down

0 comments on commit 60b319b

Please sign in to comment.