Take the following dummy plot-recipe:
using Plots
struct Example end
@recipe function f(ex::Example)
@series begin
seriescolor --> 1
[1:10, 1:10]
end
for n in 1:10
@series begin
seriestype --> :scatter
seriescolor --> 2
[n], [n+1]
end
end
end
ex = Example()
plot(ex)
Is there a way to assign the same seriescolor
to all the @series
elements within the loop, without me specifying the colour 2
in seriescolor --> 2
? Keep in mind that this is just a MWE: in my real problem, I must retain the loop structure.