I work with histograms and would like to export it to EPS format. I've noticed that my exported image loses the PlotRangeClipping option that I set up when I export the plot. This is true for at least EPS, PNG and PDF.
Based on this question and its accepted answer, I defined the function
OutlinedExport[name_,gr_,opts:OptionsPattern[]]:= Export[ name, First@ImportString[ ExportString[ gr, "PDF" ], "PDF", "TextOutlines"->True ], FilterRules[ {opts}, Options[Export] ] ] Now here is an example of histogram
data = Table[InverseCDF[NormalDistribution[0, 1], Random[]], {i, 1000}]; PlotB = Histogram[data, 20, PlotRange -> {{-2, 2}, Automatic}, Frame->True] OutlinedExport["output2.pdf", PlotB, ImageSize -> 600] which appears to have lost the clipping during the export.
The questions are :###
Is there a way to preserve clipping as defined through options like PlotRangeClipping and PlotRangePadding ?
If the problem is related with the OutlinedExport, is there a way to answer my question while also keeping the outline of fonts (which I need but have here removed for the sake of example) ?