Hi all,

I Have just installed *mayavi* via pip and decided to run the example here
https://scipy-cookbook.readthedocs.io/items/MayaVi_ScriptingMayavi2_MainModules.html
which
shows how to plot 3D data
with the module *"ScalarCutPlane"*.

I have been trying to reproduce *examle#2* but I always get the following
error message:

  File "/...../scalarcutplane.py", line 12, in <module>
    scp.module_manager.scalar_lut_manager.data_range = [0, 1]

AttributeError: 'NoneType' object has no attribute 'scalar_lut_manager'

Here is how my .py file looks like:

import mayavi
from mayavi.modules.scalar_cut_plane import ScalarCutPlane
### cutplane #1, normal to Ox, opacity = 0.2, representation = surface
scp = ScalarCutPlane()
# # script.add_module(scp)
scp.implicit_plane.normal = (1, 0, 0)
scp.implicit_plane.origin = (25, 25, 25)
scp.implicit_plane.widget.enabled = False
scp.actor.property.diffuse = 0.0
scp.actor.property.ambient = 1.0
scp.actor.property.opacity = 0.2
scp.module_manager.scalar_lut_manager.data_range = [0, 1]

*How to deal with this issue, please?*

Regards,
Pacome
*___*
*_____________*Pacome NGUIMEYA
Ph.D. Candidate
Computational Condensed Matter Physics
University of Cape Town (UCT), South Africa
*“Be Yourself; everyone else is already taken.” *
*Oscar Wilde*
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to