enthought / enthought/mayavi

Setting InteractorStyleTerrain does nothing in Jupyter

Open
#794 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
316
Avg merge
7h 44m
Merged PRs (30d)
5

Description

I want to keep Z axis up. In [1] I've found
`from tvtk.api import tvtk`
`fig = mlab.gcf()`
`fig.scene.interactor.interactor_style = tvtk.InteractorStyleTerrain()`
does that.

This code works as expected in a cell in Jupyter (opens new mayavi window):
`%gui qt`
`from mayavi import mlab`
`from tvtk.api import tvtk`
`fig = mlab.gcf()`
`fig.scene.interactor.interactor_style = tvtk.InteractorStyleTerrain()`
`mlab.test_barchart()`

This code doesn't:
`from mayavi import mlab`
`mlab.init_notebook()`
`from tvtk.api import tvtk`
`fig = mlab.gcf()`
`fig.scene.interactor.interactor_style = tvtk.InteractorStyleTerrain()`
`mlab.test_barchart()`

It shows the barchart in the notebook, but still allows me to turn it upside down.

[1] https://stackoverflow.com/questions/14225512/constrain-mayavi-mouse-drag-to-rotating-earth-around-its-axis

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.