[email protected] wrote:
> For vector images, the gl2ps dialog seems to block mlab from writing the file.
> So any hint on how to circumvent the dialog or sent an 'OK' to a xvfb session
> would solve my problem.

No problem.  Do the following (assuming 's' is your mayavi scene or any 
object that has a scene trait):

  from enthought.tvtk.api import tvtk
  exp = tvtk.GL2PSExporter(file_format='pdf', sort='bsp', compress=1)
  s.scene.save_gl2ps('/tmp/t.pdf', exp)

It should not pop-up a UI in this case.

> In addition, the .pdf and .ps files do not seem to qualify as vector
> output. .PS clearly
> produces an embedded raster image and .pdf is of very poor quality. .EPS gets 
> it
> amazingly right, but at the expense of quite longer output times.
> 
> For raster images, i have the problem that the size option in savefig() does 
> not
> work. It does at least try if I put the savefig() command with size
> option twice,
> but what happens is the following: The resulting figure's size is
> right, but everything
> is blank except for the upper left corner in which the original. So if
> I could write a,
> say 5000x5000 raster image, that would solve too. But I dont even know
> if there is
> a limit to the xvfb screen sizes. So .eps would be much preferred.

Try using the magnification of the scene. If 's' is your mayavi scene 
then you can do:

  s.scene.magnification = 2 # or 4

and VTK should magnify the rendered image.  Try it and see if that helps.

HTH,
cheers,
prabhu

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to