|
1 | 1 | using Test, PlotsBase, Unitful, LaTeXStrings |
| 2 | +using RecipesBase: cycle |
2 | 3 | const PGFPlotsX = Base.get_extension(PlotsBase, :PGFPlotsXExt).PGFPlotsX |
3 | 4 |
|
4 | 5 | function create_plot(args...; kwargs...) |
@@ -71,7 +72,7 @@ with(:pgfplotsx) do |
71 | 72 | rand(11, 4), |
72 | 73 | lab = "lines", |
73 | 74 | w = 3, |
74 | | - palette = :grays, |
| 75 | + palette = cycle(:grays), |
75 | 76 | fill = 0, |
76 | 77 | α = 0.6, |
77 | 78 | ) |
@@ -134,7 +135,7 @@ with(:pgfplotsx) do |
134 | 135 | @test plot( |
135 | 136 | PlotsBase.fakedata(100, 10), |
136 | 137 | layout = 4, |
137 | | - palette = [:grays :blues :hot :rainbow], |
| 138 | + palette = cycle.([:grays :blues :hot :rainbow]), |
138 | 139 | bg_inside = [:orange :pink :darkblue :black], |
139 | 140 | ) isa PlotsBase.Plot |
140 | 141 | end |
@@ -347,9 +348,9 @@ with(:pgfplotsx) do |
347 | 348 | @testset "Markers and Paths" begin |
348 | 349 | pl = plot( |
349 | 350 | 5 .- ones(9), |
350 | | - markershape = [:utriangle, :rect], |
| 351 | + markershape = cycle([:utriangle, :rect]), |
351 | 352 | markersize = 8, |
352 | | - color = [:red, :black], |
| 353 | + color = cycle([:red, :black]), |
353 | 354 | ) |
354 | 355 | axis_contents = first(get_pgf_axes(pl)).contents |
355 | 356 | plots = filter(x -> x isa PGFPlotsX.Plot, axis_contents) |
|
0 commit comments