MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Export a graphical plot to pdf file

  • To: mathgroup at
  • Subject: [mg128600] Re: Export a graphical plot to pdf file
  • From: "Nasser M. Abbasi" <nma at>
  • Date: Thu, 8 Nov 2012 18:59:30 -0500 (EST)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <k7ct90$dqe$>
  • Reply-to: nma at

On 11/6/2012 11:57 PM, Szymon Roziewski wrote:
> Hi there,
> I have a ContourPlot result which I need to put into pdf file.
> The problem is that the filled area is in a mess, I mean there are lots of
> thin white stripes on it.
> For example, please try out this bunch of code
> gr = ContourPlot[x^2 + y^2, {x, -1, 1}, {y, -1, 1}];
> Export["file.pdf", gr]
> Best regards,
> Szymon Roziewski

Do not know much about this, but trying few things, I found this
to produce good image in the PDF file (no  white stripes on it)

gr = ContourPlot[x^2 + y^2, {x, -1, 1}, {y, -1, 1}]
Export["file.pdf", Rasterize[gr, ImageResolution -> 128]]

You can change the options to Rasterize to see which gives
you best image in the PDF.

To obtain more information on the pdf file generated by
the export, you can list the Elements. something like:

lis = Import["file.pdf", "Elements"]
  Table[{lis[[i]], Import["file.pdf", lis[[i]]]}, {i, 1, Length[lis]}],
   Frame -> All]

Another thing to try is to issue the command

SetOptions[$FrontEndSession, PrintingStyleEnvironment -> "Working"]

first before exporting. Again, this is something to try.
But the Rasterize'd image in PDF do not have the white stripes
any more.


  • Prev by Date: Error Code: 616
  • Next by Date: Re: Non Commutative Multiply
  • Previous by thread: Re: Export a graphical plot to pdf file
  • Next by thread: Re: Export a graphical plot to pdf file