Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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]}]

enter image description here

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.

share|improve this question

marked as duplicate by Michael E2, Mr.Wizard Aug 26 '14 at 19:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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
Thanks to m_goldberg , I was waiting for his answer to accept it. – Algohi Aug 26 '14 at 2:54
up vote 9 down vote accepted

I agree with beli that an answer is desriable, with mfvonh that closing of questions is a bit out of control, and with m_goldberg that Prolog should be used. I'd happily wait for m_goldberg to post an answer but, since there's 4 close votes already, here's a simple example of the difference between Epilog and Prolog. 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.

Column[Framed[Plot[x^2, {x, -1.3, 1.3},
  # -> {Lighter[Gray], EdgeForm[Black],
   Polygon[{{-1, 0}, {1, 0}, {1, 1}, {-1, 1}}]},
 ImageSize -> 300, PlotLabel -> #]] & /@
{Epilog, Prolog}]

enter image description here

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.