# How can I export 3D plots as vector graphics? [duplicate]

Consider the following simple example code:

plot3D = ListPlot3D[{{0, 0, 1}, {1, 0, 0}, {0, 1, 0}}, Mesh -> All];
Export["plot3D.pdf", plot3D]


As clearly seen, the output is not a vector graphics.

How can I export a 3D image into a vector graphics?

# First edit

Unfortunately, the solutions proposed in the linked answer, do not really work. For example consider the following plot, as shown inside Mathematica (code on this gist):

This plot is built entirely using Graphics3D primitives, if that matters, so it should be relatively easy to export as vector graphics (I guess).

Exporting it directly with Export["out.pdf",plot] produces a rasterized output.

Using the second solution of Jens in the linked answer, i.e.:

Export["out.pdf",Graphics[Inset[plot, Automatic, Automatic, Scaled[1]]]]


produces the following (obviously not right) vector graphics:

The other solution of directly printing into pdf does not work either: using the default Windows 10 pdf printer gives a rasterized image, while printing with the Foxit Reader Pdf printer gives the following truncated image:

So, aren't there other solutions to obtain a vector graphics with Mathematica?

• When I exported it as svg, and looked at the .svg file using editor, I see Mathematica is actually making .png image inside and just encoding the image data. Here is the line: <image id="image83" width="360" height="287" xlink:href="data:image/png;base64,iVBOR..... so it looks like Mathematica does not really support true svg. It just wraps the png encoded data inside an svg file! Nov 22, 2015 at 18:14
• @Nasser that is indeed what you also see by exporting into pdf. Exporting 2D plots results in clearly vector graphics object, exporting 3D plots does not. My question is therefore if there is a way around this problem, eventually (but preferably not) using some external tools.
– glS
Nov 22, 2015 at 18:26
• May be this was done as temporary solution until WRI adds true vector graphics export to 3D plots. May be in version 11 it will do true svg for 3D. Nov 22, 2015 at 18:32
• Why don't you export it as an EPS Export["plot3D.eps", plot3D,"EPS"]? Nov 22, 2015 at 18:46
• I have reproduced your result. The key is addition of the option ImageSize -> 1000 in GraphicsRow. The same result can be achieved with Graphics[Inset[pl], ImageSize -> 1000] (where pl is your plot). Nov 24, 2015 at 9:40