pythonaxis-labelsmayavimayavi.mlab

Preventing axis from updating on camera move - mayavi python


I previously found a flag command to set that allowed me to prevent the axes of the scene from updating on camera move. Now I can't find it again. I've been digging through documentation but am not having any luck.

To further explain, I don't want the axes to update positioning as shown in these two images:

Before move:

before move

After move:

after move


Solution

  • Not sure to understand exactly what you need but maybe you can try:

    axes.axes.fly_mode = 'none'
    

    For example:

    from mayavi import mlab
    
    myfig  = mlab.figure()
    myplot = mlab.plot3d([0,1,2],[0,1,2],[0,1,1])
    myaxes = mlab.axes()
    myaxes.axes.fly_mode = 'none'
    
    mlab.show()