Skip to content

Commit

Permalink
fix other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
isentropic committed Jul 25, 2024
1 parent 1d1a034 commit d0b917a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions PlotsBase/test/test_args.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ end
end

@testset "Series Attributes" begin
pl = plot([[1, 2, 3], [2, 3, 4]], lw = 5)
@test hline!(deepcopy(pl), [1.75])[1].series_list[3][:label] ==
hline!(deepcopy(pl), [1.75], z_order = :front)[1].series_list[3][:label] ==
pl = plot([[1, 2, 3], [2, 3, 4]], lw = 5, label=:auto)
@test hline!(deepcopy(pl), [1.75], label=:auto)[1].series_list[3][:label] ==
hline!(deepcopy(pl), [1.75], z_order = :front, label=:auto)[1].series_list[3][:label] ==
"y3"
@test hline!(deepcopy(pl), [1.75], z_order = :back)[1].series_list[1][:label] == "y3"
@test hline!(deepcopy(pl), [1.75], z_order = 2)[1].series_list[2][:label] == "y3"
@test hline!(deepcopy(pl), [1.75], z_order = :back, label=:auto)[1].series_list[1][:label] == "y3"
@test hline!(deepcopy(pl), [1.75], z_order = 2, label=:auto)[1].series_list[2][:label] == "y3"
sp = pl[1]
@test isempty(sp[1][:extra_kwargs])
@test sp[2][:series_index] == 2
Expand Down
6 changes: 3 additions & 3 deletions PlotsBase/test/test_pgfplotsx.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ with(:pgfplotsx) do

@testset "Legends" begin
pl = plot(rand(5, 2), lab = ["1" ""], arrow = true)
scatter!(pl, rand(5))
scatter!(pl, rand(5), label=:auto)
axis_contents = first(get_pgf_axes(pl)).contents
leg_entries = filter(x -> x isa PGFPlotsX.LegendEntry, axis_contents)
series = filter(x -> x isa PGFPlotsX.Plot, axis_contents)
Expand Down Expand Up @@ -93,8 +93,8 @@ with(:pgfplotsx) do
end

@testset "Plot in pieces" begin
pl = plot(rand(100) / 3, reg = true, fill = (0, :green))
scatter!(pl, rand(100), markersize = 6, c = :orange)
pl = plot(rand(100) / 3, reg = true, fill = (0, :green), label=:auto)
scatter!(pl, rand(100), markersize = 6, c = :orange, label=:auto)
axis_contents = first(get_pgf_axes(pl)).contents
leg_entries = filter(x -> x isa PGFPlotsX.LegendEntry, axis_contents)
series = filter(x -> x isa PGFPlotsX.Plot, axis_contents)
Expand Down

0 comments on commit d0b917a

Please sign in to comment.