[SciPy-user] 3d plotting question

Prabhu Ramachandran prabhu_r at users.sf.net
Thu Sep 29 09:44:29 EDT 2005


>>>>> "Ryan" == Ryan Krauss <ryanfedora at comcast.net> writes:

    Ryan> Prabhu, I would be really interested in getting eps/pdf
    Ryan> output.  How hard would it be to get this working in
    Ryan> Windows?

If you use the updated VTK-Python zip file that is available here:

  http://mayavi.sourceforge.net/dwnld/vtk/win32/VTK-Python-4.4.zip

then gl2ps support should be available.  The new MayaVi-1.5 installer
does have gl2ps support.  The above zip file is made using Enthon's
latest VTK dlls.  Earlier versions did not support gl2ps but the one I
sited in my previous mail does support gl2ps.  So, if you install this
version of VTK and then save a mayavi image via gl2ps (there is a menu
option for this) you should get vector EPS/PDF output.

    Ryan> I don't even mind if the drawing part of the figure is
    Ryan> somewhat pixelated, I just think it looks bad when the axes
    Ryan> and labels aren't type set well.

By default vtk's gl2ps exporter dumps every primitive that it can (it
can't do image actors though) as a vector graphic.  However for
complex visualizations you can turn on the 'Write3DPropsAsRasterImage'
on then all 3d primitives are dumped as an image and all 2d primitives
(like text) will be rendered as vector graphics.  For example, try
gl2ps on the heart.mv example.  It will take a while to write but
should work.

HTH.

cheers,
prabhu




More information about the SciPy-User mailing list