AlexNoir
AlexNoir

Reputation: 789

Lightning options in matplotlib

I would like to know if in matplotlib you can use light options as I used to use in matlab for surf and color commands:

http://www.mathworks.co.uk/help/matlab/visualize/lighting-overview.html

For example, I used to plot surfaces in matlab like:

surf(X, Y, Z) 
shading interp
view(0,90)
lightangle(-45,30)
set(findobj(gca,'type','surface'),...
   'FaceLighting','phong',...
   'AmbientStrength',.3,'DiffuseStrength',.8,...
   'SpecularStrength',.9,'SpecularExponent',25,...
   'BackFaceLighting','unlit');

but now I can not find anything like this in matplotlib. Any ideas? Thank you in advance.

Upvotes: 0

Views: 863

Answers (1)

David Zwicker
David Zwicker

Reputation: 24268

matplotlib does not support such features, since it is essentially a 2D plotting library. In matplotlib, 3D plotting is not much more than a fancy projection of the 3D data on the 2D canvas. You might wanna use real 3D plotting libraries like MayaVi, if you need more features.

Upvotes: 2

Related Questions