# How to make Epilog render behind the main plot [duplicate]

Consider this example:

data = Table[{i, i + 20 Sin[RandomReal[-i, i]][[1]]}, {i, 1, 1000}];
Plot[x, {x, 0, 1000}, PlotStyle -> {Red, Thickness[0.01]},
Epilog -> {PointSize[0.02], Point[data]}]


It can be seen that the points are rendered over the main plot and makes it invisible.

How to control the layers of plot so that to send a layer backward or to bring it forward.

• Use Prolog, not Epilog. – m_goldberg Aug 26 '14 at 1:03
• @m_goldberg Great, thanks. – Algohi Aug 26 '14 at 1:12
• @m_goldberg This question may seem simple, but I'm not sure if it has been asked before. Why don't post that as an answer? – Dr. belisarius Aug 26 '14 at 1:16
• Seems like we (as a site) have been on a question-closing rampage recently :/ I'd say keep it open and post the answer, too. – mfvonh Aug 26 '14 at 1:47
• "Prolog is an option for graphics functions which gives a list of graphics primitives to be rendered before the main part of the graphics is rendered." That seems pretty clear to me. And Prolog is the first "See Also" link in the docs for Epilog. I agree with the close votes. Perhaps there are other questions unduly closed. – Michael E2 Aug 26 '14 at 3:03

As stated in the comments, a good solution is to use Prolog, rather than Epilog. The difference, of course, is that Graphics directives in Epilog are laid down on top of the plot, while Graphics directives in Prolog are laid down under the plot. Here's a simple example illustrating this difference.
Column[Framed[Plot[x^2, {x, -1.3, 1.3},