Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I think the following image already shows the problem, similar to Avoiding white lines inside filled area in RegionPlot exported as PDF or PS the pdf export of the chart creates thin lines in the plot. The fixing rule proposed in the related question seems not to work (sorry I am really new to mathematica). Disabling the Antialiasing doesnt improves the situation!


share|improve this question
up vote 5 down vote accepted


The problem seems to be that the polygonal regions in the exported PDF file do not have edge strokes. It can be partially solved by reimporting the figure and correct this.

(* FILENAME.pdf contains an exported BarChart3D figure *)
(* 't' gives the desired edge thickness *)
chart = Import["FILENAME.pdf"];
chart = chart /. {FaceForm[n__] :> {FaceForm[n], EdgeForm[{Thickness[t], n}]}};
Export["NEW_FILENAME.pdf", chart];

I tested this code only for BarChart3D output. It seems that in the reimported figure all colored regions are defined by FilledCurves and all additional lines by JoinedCurves. Furthermore, a FaceForm definition is only found in the region declarations.

Possible problem

Different PDF viewers seem to interpret a Thickness[n] declaration differently. This can be solved by replacing Thickness with AbsoluteThickness.


This solution preserves the vector graphics character of the chart in the exported PDF file. @Jens solution rasterizes the image and makes it resolution dependent.

share|improve this answer

To make nicer PDFs, you could adapt the answer here as follows. Before making any plots, execute the command

    Prolog -> {{EdgeForm[], Texture[{{{0, 0, 0, 0}}}], 
       Polygon[#, VertexTextureCoordinates -> #] &[{{0, 0}, {1, 
          0}, {1, 1}}]}}] &, {Graphics3D, ContourPlot3D, 
   ListContourPlot3D, ListPlot3D, Plot3D, ListSurfacePlot3D, 
   ListVectorPlot3D, ParametricPlot3D, RegionPlot3D, RevolutionPlot3D,
    SphericalPlot3D, VectorPlot3D, BarChart3D}];

and then do the BarChart3D. If you export it to PDF now, the process will take a little longer but the output will look nicer, without the lines. The explanation why this works is given in the linked answer. I only modified that trick by appending BarChart3D to the list of functions to which it applies.

share|improve this answer
great! works perfectly! thx! – MrMuh Nov 16 '12 at 17:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.