Axes don't scale on mlab.savefig(..., magnification=2)
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 316
- Avg merge
- 7h 44m
- Merged PRs (30d)
- 5
Description
Axes don't scale when a figure is saved with mlab.savefig and magnification > 1. This is reproducible with version 4.4.0 from anaconda as well as the current git master branch on OS X using the pyqt, pyside, and wx backends.
```
from mayavi import mlab
from numpy import random
from tvtk.api import tvtk
def view(dataset):
fig = mlab.figure(bgcolor=(1, 1, 1), fgcolor=(0, 0, 0),
figure=dataset.class_name[3:])
surf = mlab.pipeline.surface(dataset, opacity=0.1)
# extract edges is giving an attribute error with git version of mayavi
# mlab.pipeline.surface(mlab.pipeline.extract_edges(surf),
# color=(0, 0, 0), )
mlab.axes()
data = random.random((3, 3, 3))
i = tvtk.ImageData(spacing=(1, 1, 1), origin=(0, 0, 0))
i.point_data.scalars = data.ravel()
i.point_data.scalars.name = 'scalars'
i.dimensions = data.shape
view(i)
mlab.show()
mlab.savefig("snapshot_1x.png", magnification=1)
mlab.savefig("snapshot_2x.png", magnification=2)
```
snapshot_1x.png:

snapshot_2x.png:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.