Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12295
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Export a graphical plot to pdf file |
| Date | 2012-11-09 00:03 +0000 |
| Message-ID | <k7hh8e$o1m$1@smc.vnet.net> (permalink) |
| References | <k7ct90$dqe$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
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"]
Grid[
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.
--Nasser
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Export a graphical plot to pdf file Szymon Roziewski <szymon.roziewski@gmail.com> - 2012-11-07 05:57 +0000
Re: Export a graphical plot to pdf file "Nasser M. Abbasi" <nma@12000.org> - 2012-11-09 00:03 +0000
Re: Export a graphical plot to pdf file "Kevin J. McCann" <kjm@KevinMcCann.com> - 2012-11-10 07:09 +0000
Re: Export a graphical plot to pdf file RBaillie <bobbaillie@frii.com> - 2012-11-10 07:09 +0000
Re: Export a graphical plot to pdf file Kristjan Kannike <kkannike@ut.ee> - 2012-11-10 08:30 +0000
Re: Export a graphical plot to pdf file Szymon Roziewski <szymon.roziewski@gmail.com> - 2012-11-13 05:15 +0000
csiph-web