True 3D plotting with matplotlib

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

True 3D plotting with matplotlib

clemens.loschnauer
Hi everyone,

I have got a question with regards to the 3D plotting capabilites of
matplotlib: Are there any plans/ongoing projects to make matplotlib (or
its mplot3d submodule) suitable for complex 3D plotting?
In particular, I am interested in plotting of geometric objects and
surfaces and exporting these to vector graphics formats. I have done some
research online and while there are some packages out there for 3D
visualisation of data, all of them only export to raster graphics.
The only program that I have come across that supports this is
Mathematica, which is commercial. I believe that the option of producing
publication-quality vector graphics for complex 3D scenes as might be
desired in a scientific application is a feature that is currently missing
in matplotlib.
When I say high quality I have something like the 3D plots of the
tikz/pgfplots packages in latex in mind, although again these do not
support complex 3D scenes. I know there is mayavi, but I feel this does
not offer the same quality for a scientific visualisation. Besides, it is
a separate package and not part of matplotlib.
An example of a visualisation that I want to achieve is the following:
Plot a function of two variables as a 3D surface and then add a sphere
that is tangent to the surface at some point. Then allow different camera
angles with correct occlusion of hidden parts and varying levels of
transparency. Add lighting and shading and export this as a vector graphic
to a pdf file.

Are there any plans to make something like this possible in matplotlib? If
not, does anyone have hints as to what would be required to program this?

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: True 3D plotting with matplotlib

Benjamin Root
Matplotlib has a layering rendering engine at the moment as its core design. This causes significant hurdles for a true 3D rendering engine within matplotlib. mplot3d is an attempt to work around that, but it is highly limited. The vispy project and glumpy are projects that we have encouraged development of in the past with the intent of integrating their technologies into matplotlib in the future in some future collaboration. While they have made significant strides, a roadmap for this integration has yet to materialize.

On Sun, Jun 3, 2018 at 11:54 AM, <[hidden email]> wrote:
Hi everyone,

I have got a question with regards to the 3D plotting capabilites of
matplotlib: Are there any plans/ongoing projects to make matplotlib (or
its mplot3d submodule) suitable for complex 3D plotting?
In particular, I am interested in plotting of geometric objects and
surfaces and exporting these to vector graphics formats. I have done some
research online and while there are some packages out there for 3D
visualisation of data, all of them only export to raster graphics.
The only program that I have come across that supports this is
Mathematica, which is commercial. I believe that the option of producing
publication-quality vector graphics for complex 3D scenes as might be
desired in a scientific application is a feature that is currently missing
in matplotlib.
When I say high quality I have something like the 3D plots of the
tikz/pgfplots packages in latex in mind, although again these do not
support complex 3D scenes. I know there is mayavi, but I feel this does
not offer the same quality for a scientific visualisation. Besides, it is
a separate package and not part of matplotlib.
An example of a visualisation that I want to achieve is the following:
Plot a function of two variables as a 3D surface and then add a sphere
that is tangent to the surface at some point. Then allow different camera
angles with correct occlusion of hidden parts and varying levels of
transparency. Add lighting and shading and export this as a vector graphic
to a pdf file.

Are there any plans to make something like this possible in matplotlib? If
not, does anyone have hints as to what would be required to program this?

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: True 3D plotting with matplotlib

Ludwig Schwardt-2
In reply to this post by clemens.loschnauer
Hi,

On the topic of publication-quality 3D vector graphics (but unfortunately not matplotlib...):

I like Sketch. Although a bit old by now, you can still get it fromĀ sketch4latex.sourceforge.net. It has a bit of a learning curve (similar to TikZ) but is nice for basic 3D plots.

I even used it to make a very basic vector animation viewable with Adobe Acrobat Reader (see slide 16 of the presentation atĀ http://www.atnf.csiro.au/people/ban115/conferences/CALIM2014/talks/day3/calim2014_schwardt.pdf - will send source if interested).

Good luck,

Ludwig


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users