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:
\begin{figure}[!htb]
\centering
\includegraphics[scale=.7]{plot.eps}
\caption{Digraph.}
\label{fig:digraph}
\end{figure}
And after that I do pdf. It displays as:
How may I solve this problem?
EDIT: SIMPLE EXAMPLE
Let
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", %];
Then I save it as EPS, to insert in LATEX:
\begin{figure}[!htb]
\centering
\includegraphics[scale=.7]{zz.eps}
\caption{Digraph.}
\label{fig:digraph}
\end{figure}
There are "whiskers". How may I remove it?




PlotRangeClippingis for other graphics you might add to the plot BTW. The actual plot lines I think are always clipped. – george2079 Mar 22 '17 at 20:30{$Version, $ReleaseNumber}. Note that despite what you said, there isn't an explicitPlotRangeClipping->Truein your (incomplete) example. – Szabolcs Mar 22 '17 at 20:36PlotRangeClipping->Trueis true by default for plots. My Mathematica is {"11.0.0 for Microsoft Windows (64-bit) (July 28, 2016)", 0} – illuminato Mar 22 '17 at 20:54Export, never right click, Save Graphics As... 2. Prepare figures to size. As I said, this is almost never visible at print sizes---provided you keep the figure at its original size and do not rescale in LaTeX. 3. You can exportMagnify[fig,2]instead offig, then shrink the result by 1/2. Warning: be sure the magnified image fits in your notebook width, otherwise there will be bad effects. I don't know a fix for thisMagnifyproblem. – Szabolcs Mar 22 '17 at 21:21Export[..., Magnify[fig, 5]], and then rescale the result to be 5x smaller. The bleeding beyond the frame will also be 5x smaller. – Szabolcs Mar 22 '17 at 21:24FrameStyle -> Directive[AbsoluteThickness[1], Black]. But given that the imprecision is clearly smaller than 1 printer's point, i.e. 0.35 mm, are you sure that this is actually visible in print when preparing the figure to size? Also, are you sure that the problem you show in your first plot is the same as in the second one? I am not convinced about this. I suspect your first plot is affected by a different problem. But we can't help with it without an example. You could try to upload the Graphics expression somewhere. – Szabolcs Mar 23 '17 at 16:14