I'd like to draw some curves using Plot, and I tried follow codes:

 Plot[Table[n/Sqrt[\[Pi]] Exp[-n^2 x^2], {n, {3, 5, 7}}], {x, -1, 1}, 
 PlotStyle -> Directive[Black, Thick], 
 AxesStyle -> 
 Directive[Arrowheads[0.04], GrayLevel[0.7], Thick, Opacity[1]],
 Ticks -> None, PlotRange -> {{-1.2, 1.2}, {-0.7, 4.5}}, 
 AspectRatio -> 1, RegionFunction -> Function[{x}, Abs[x] < 1]]

Then it comes out this:

enter image description here

Which I confused is that the gray axes are in the front of the black curves(esp. for the x axes). How can I move the axes backward to show my curve well?

  • $\begingroup$ You could make two plots. One without data and one without axes and use Show or Overlay. No time atm for a full answer with example. $\endgroup$ – Johu Jun 29 '14 at 12:06
  • $\begingroup$ You only have to add the option ` Method -> ("AxesInFront" -> False)` $\endgroup$ – eldo Jun 29 '14 at 12:25
  • $\begingroup$ @eldo thank you. The problem has been solved $\endgroup$ – HaoLiang Jun 29 '14 at 12:40
  • $\begingroup$ @Johu Overlay is ok, but Show can't solve this problem, because Show will apply the same Graphics options to all objects. $\endgroup$ – HaoLiang Jun 29 '14 at 12:43

Browse other questions tagged or ask your own question.