enthought / enthought/mayavi

Preset focal point is ignored when choosing view type from GUI

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

Description

**Environment**
- Python 3.6.9
- Mayavi 4.6.2

**Issue**
The preset `focalpoint` seems to be ignored when choosing the view type (ex. `View along the +Z axis`) in GUI.

To be specific, the `focalpoint` is *first* set in the code:
```Python
mlab.view(
azimuth=180,
elevation=60.0,
focalpoint=(0,0,0),
distance=10.0,
figure=fig,
)
```
*Initially*, the plot is correct; the focal point is set to `(0,0,0)`:

![Screenshot from 2019-11-29 00-19-00](https://user-images.githubusercontent.com/23105277/69817412-e30ff400-123d-11ea-9e14-5aaaf8844e21.png)

However, once I clicked `View along the +Z axis`, the `focalpoint` seems to be reset to the average of all the data (in this case, point cloud), shifting the whole plot.
![Screenshot from 2019-11-29 00-20-05](https://user-images.githubusercontent.com/23105277/69817474-08046700-123e-11ea-8358-ad6ea65a619b.png)

The plot after clicking:
![Screenshot from 2019-11-29 00-10-40](https://user-images.githubusercontent.com/23105277/69817489-12266580-123e-11ea-8ee8-8317d1fe4fb4.png)

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.