I've generated a 3D plot with python and pyplot. I am able to export this plot to PDF. Which is quite boring and sometimes.. Flat 3D plots can be hard to read/understand.
However, PDF supports interactive 3D models, such as CAD models. This made me wonder if it is possible to export a 3D plot generated by matplotlib or something similar, to 3D PDF? This would be amazing to store beautiful 3D plots! If so, how can I do this?
Not so much an answer as a summary of my research so far:
a previous question asked pretty much the same but came to no conclusion
.pdf supports two internal 3d formats - u3d (since version 7), and prc (since version 8). prc is a more complicated but more compact format.
(c. 2006): Acrobat 3d supports many more formats - over 40 - but does so by converting them to u3d for import (reference)
(Dec 2013): matplotlib's drawing core is 2d only; mplot3d is just a workaround, everything gets projected to 2d before being rendered. (reference) Link to GlumPy?
At the moment, I see two likely approaches:
write a new 3d output engine for matplotlib to u3d
write a 3d renderer for matplotlib to OpenGL (Acrobat 3d can capture the contents of an active OpenGL frame)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With