Closed GoogleCodeExporter closed 9 years ago
i just replaced that line with fig._g.SetSize(640, 480)
but after which,
in:
try:
v = vtk.vtkMesaRenderer()
_graphics_fact = vtk.vtkGraphicsFactory()
_graphics_fact.SetUseMesaClasses(1)
_image_fact = vtk.vtkImagingFactory()
_image_fact.SetUseMesaClasses(1)
del _graphics_fact
del _image_fact
del v
except Exception, msg:
print "No mesa", msg
because of this, my code says:
No mesa 'module' object has no attribute 'vtkMesaRenderer'
i tried
print dir(vtk)
and vtkMesaRenderer is not there
how to install it?
Original comment by bernardj...@gmail.com
on 28 Jan 2009 at 1:06
Your first problem is somewhat strange. Which version of VTK do you have? I
tried EPD
Python yesterday, which includes VTK, and I had no problem when running some
simple
tests with the VTK backend.
The second problem is simply a warning that can safely be ignored, at least on
Windows. Mesa classes are necessary to do offscreen rendering, but is not used
in
Windows. The warning has been removed in the vtk_new backend but,
unfortunately, I
haven't had time finish writing this yet.
Original comment by johannes...@gmail.com
on 2 Feb 2009 at 10:41
which VTK, hmm, i just used this: VTK 5.2.1 (ZIP, 11.9 MB) in
http://www.lfd.uci.edu/
~gohlke/ because i can't understand how to wrap vtk to python in
http://vtk.org/VTK/
resources/software.html
after unzipping, i downloaded the VTKData, and the Examples. Some example codes
are
working fine, some are not...
Original comment by bernardj...@gmail.com
on 5 Feb 2009 at 8:13
wahh! it works! when i put the hardcopy('tmp0.png')
it saves the needed plot!
i thought it is not working, coz it just opens another window, then closes
after
less than a second... but it plots... when saved, how do i retain the
window...? coz
when running the code, it just appears and disappears...
attached, is the screenshot showing the window that appears then disappears
after
less than a second,
this is the code:
from scitools.all import *
x = y = linspace(-5, 5, 21)
xv, yv = ndgrid(x, y)
values = sin(sqrt(xv**2 + yv**2))
contourf(xv, yv, values)
show()
hardcopy('tmp0.png')
the tmp0.png shows the right image ;-)
Original comment by bernardj...@gmail.com
on 5 Feb 2009 at 8:45
Attachments:
I usually call raw_input if I want to keep the window until I press enter. Or
use
time.sleep(sec) to keep the window for sec seconds.
Original comment by johannes...@gmail.com
on 5 Feb 2009 at 1:58
by the way, when i do this:
axis([0, 23, 0, 23, 0, 8]) #for a square
hardcopy('tmp8.png')
axis([0,8,0,23,0,8]) #set this for 4 rectangles
hardcopy('tmp9.png')
axis([0,23,15,23,0,8])
hardcopy('tmp10.png')
axis([15,23,0,23,0,8])
hardcopy('tmp11.png')
axis([0,23,0,8,0,8])
hardcopy('tmp12.png')
it makes a nice square volumetric plot
but the other four has the EasyViz Window on them... :-(
how can i make it disappear?
at the intervals, i tried moving the EasyViz Window and the window in the image
also
moves. how can i make it disappear, how can i make the window move to a far x-y
point? or other ways?
Original comment by bernardj...@gmail.com
on 9 Feb 2009 at 1:37
Attachments:
show=False :-)
Original comment by bernardj...@gmail.com
on 16 Feb 2009 at 5:58
Original comment by johannes...@gmail.com
on 10 Sep 2009 at 11:48
Original issue reported on code.google.com by
bernardj...@gmail.com
on 28 Jan 2009 at 11:29Attachments: