Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 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.

8  
Use Prolog, not Epilog. –  m_goldberg Aug 26 at 1:03
    
@m_goldberg Great, thanks. –  Algohi Aug 26 at 1:12
2  
@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? –  belisarius Aug 26 at 1:16
5  
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 at 1:47
    
Thanks to m_goldberg , I was waiting for his answer to accept it. –  Algohi Aug 26 at 2:54

1 Answer 1

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.