cross posted on community.wolfram.com

I've noticed that in some situations the clipping is not done properly, despite the explicit setting PlotRangeClipping->True: So I plot some complex function:

Plot[{my function}, {M5, 0, 400}, PlotRange -> {{0, 400}, {0, 1500}}, 
 Frame -> True, 
 FrameTicks -> {{{0, 300, 600, 900, 1200, 1500}, 
    None}, {{0, 100, 200, 300, 400}, None}}, 
 FrameLabel -> {"Subscript[\[Mu], 5] (MeV)", "m (MeV)"}, 
 PlotStyle -> {{Black, Thickness[.007]}, {Black, Dashed}, 
   Black, {Black, Dashing[Tiny]}}, 
 PlotLabels -> Placed[{"+", "\[Sigma]", "-"}, {Scaled[0.6], Above}], 
 ImagePadding -> None]

Then I save it as EPS, and I insert in LATEX:


And after that I do pdf. It displays as:

enter image description here

How may I solve this problem?



ListPlot[Table[{x, Sin[x]}, {x, -0.5, 6, 0.2}], 
 PlotRange -> {{0, 5.1}, {-1, 1}}, Frame -> True, 
 ImageSize -> {200, 150}, Joined -> True, 
 ImagePadding -> {{40, 5}, {40, 5}}, PlotRangeClipping -> True]
Export["zz.eps", %];

It displays good as enter image description here

Then I save it as EPS, to insert in LATEX:


And after that I do pdf: enter image description here enter image description here

There are "whiskers". How may I remove it?

  • $\begingroup$ What is the problem? Also: it is preferred style to generate the simplest example that illustrates your problem. Do we need to know about your FrameLabel (which you don't show)? Or PlotLabels? Or evan axes labels? $\endgroup$ Commented Mar 22, 2017 at 20:18
  • $\begingroup$ this looks like an issue with whatever you are using to render the postscript. PlotRangeClipping is for other graphics you might add to the plot BTW. The actual plot lines I think are always clipped. $\endgroup$
    – george2079
    Commented Mar 22, 2017 at 20:30
  • $\begingroup$ There are situations when graphics elements will bleed slightly beyond the frame, but what you show here seems different and more serious. I tried a simple plot and I cannot reproduce the problem. Please show a complete but minimal example that illustrates the problem. Include the version of Mathematica you are using {$Version, $ReleaseNumber}. Note that despite what you said, there isn't an explicit PlotRangeClipping->True in your (incomplete) example. $\endgroup$
    – Szabolcs
    Commented Mar 22, 2017 at 20:36
  • $\begingroup$ @David I add a example. $\endgroup$
    – illuminato
    Commented Mar 22, 2017 at 20:51
  • $\begingroup$ @Szabolcs PlotRangeClipping->True is true by default for plots. My Mathematica is {"11.0.0 for Microsoft Windows (64-bit) (July 28, 2016)", 0} $\endgroup$
    – illuminato
    Commented Mar 22, 2017 at 20:54


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.