Julia, how to plot behind previous plot (how to push a plot to the backgrown of another plot)

I’m plottiong a sin and a cos function with the following code:

using Makie
x = range(0, 10, length=100)
figure, axis, lineplot = lines(x, sin)
lineplot2 = scatter!(x, cos, color = :red)

lineplot2 appears on top of lineplot, that is, the red dots appear on top of the blue line, effectively masking the blue line at some points.
How do I “push” the red dots so that they appear behind the blue line?

Make sure to speficy the plotting package you are using - there are a number of good options in Julia and they all work differently so an answer can only be helpful if it discussed the one you’re actually using.

From your code snippet I guess you are using Makie, in which case this discussion might be relevant: