enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.31k stars 284 forks source link

Figures upside-down in headless mode #94

Open mluessi opened 10 years ago

mluessi commented 10 years ago

When I use mayavi 4.3.0 (Enthought Canopy) in headless mode, figures saved using mayavi.mlab.savefig are upside-down. E.g.:

import numpy
from mayavi.mlab import *
s = numpy.abs(numpy.random.random((3, 3)))
barchart(s)
savefig('test.png')

if saved as "test.py" and running it using

python test.py

gives the correct figure

test_ok

However, if I use

DISPLAY=:1 xvfb-run -f /tmp/xauthority-tmp --auto-servernum \
-s "-screen 0 1280x1024x24 -noreset" python test.py

the figure is upside-down:

test_canopy

The figures are not upside-down when I use mayavi 4.2.0 shipped with EPD-7.3.1, so it seems to be a problem with either mayavi or VTK.

CC @agramfort @dengemann @Eric89GXL

stefanoborini commented 8 years ago

@kitchoi I get a completely black rendering on ubuntu. Do you experience the same ?

kitchoi commented 8 years ago

@stefanoborini No.