Message Boards Message Boards


Get an eps image without rasterization?

Posted 8 months ago
5 Replies
2 Total Likes

Hello All. I'm beginner of Mathematica. And I have a question. Now I make 3D-plot graphs. Like

Plot3D[x^2 + y^2, {x, -100, 100}, {y, -100, 100}]

And I intend to save images using EPS. But all images are outputed in a rasterized state. So I wanna know how can I get an eps image without rasterization

regards Kazuhiro

5 Replies

It should be possible using the "AllowRasterization" option, like this:

Export["~/Desktop/g.eps", g, "EPS", "AllowRasterization" -> False]

But it doesn't work. I assume it is a bug.

Regardless of this, my advice is not to try to do this. In earlier versions this was definitely possible, but the quality of the output left a lot to be desired. The files were huge and the seams between the polygons were visible. I completely understand why you would want a vector output. I tried to do this myself in the past. Based on that experience, I think the best approach is to rasterize and prepare figures to size:

Decide in advance for your desired print size, and choose the dimensions and resolution accordingly. You will get smaller files, better quality (when viewed at appropriate size) and much faster rendering.

Even GL2PS, which produces better quality vector output for 3D graphics than Mathematica ever has, creates files which often look problematic and have rendering artefacts. (Also, your example has many more polygons than those GL2PS samples, and is a lot more problematic to render due to the mesh that mustn't be obscured by the surface. I am very skeptical about how well even GL2PS could handle it.)

You can try the option ImageResolution -> Infinity. There is also the option "AllowRasterization" -> False, which does not seem to do anything for me, in spite of the promising name.

That works, and creates a much better output (in size and quality) than what I remembered. There are some artefacts but they are tolerable.

Is this documented anywhere?

I think I discovered it by chance, while struggling to get a vector pdf for a simple Graphics3D. The documentation for ImageResolution does not mention it.

Posted 8 months ago

Dear Gianluca Gorni, Szabolcs Horvát

Thanks for all your help. I can understand this problem and how to tackle it.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract