Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

imshow for 3D? (Python / Matplotlib) [closed]

does there exist an equivalent to matplotlib's imshow()-function for 3D-drawing of datas stored in a 3D numpy array?

like image 325
PyNeto Avatar asked Aug 10 '11 13:08

PyNeto


People also ask

Can matplotlib Pyplot be used to display 3D plots?

Matplotlib was introduced keeping in mind, only two-dimensional plotting. But at the time when the release of 1.0 occurred, the 3d utilities were developed upon the 2d and thus, we have 3d implementation of data available today! The 3d plots are enabled by importing the mplot3d toolkit.

Is PLT show () blocking?

show() and plt. draw() are unnecessary and / or blocking in one way or the other.

What happens if I dont use %Matplotlib inline?

It just means that any graph which we are creating as a part of our code will appear in the same notebook and not in separate window which would happen if we have not used this magic statement.


2 Answers

This is ill-defined, since how would you see stuff that was not at the surface of the cube?

The Mayavi documentation has various approaches of ways to do what you want to do, including cut planes and voxel-specific alpha channels. See visualizing volumetric scalar data.

Suffice it to say this requires Mayavi and is rather beyond the scope of matplotlib's (handy, but limited) 3D features.

like image 117
dwf Avatar answered Sep 19 '22 15:09

dwf


matplotlib cannot plot 3d image. you can use mayavi instead.

like image 40
HYRY Avatar answered Sep 19 '22 15:09

HYRY