/[escript]/trunk/pyvisi/py_src/examples/map.py
ViewVC logotype

Annotation of /trunk/pyvisi/py_src/examples/map.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 988 - (hide annotations)
Tue Feb 20 07:21:12 2007 UTC (13 years, 7 months ago) by jongui
File MIME type: text/x-python
File size: 1207 byte(s)
Both point and cell data should now work properly with Pyvisi. Some testing have been done but a more extensive test will be done at a later stage.
1 jongui 962 from esys.pyvisi import DataCollector, Map, Scene
2     from esys.pyvisi.constant import *
3    
4     s = Scene(renderer = Renderer.ONLINE, num_viewport = 4, x_size = 1000,
5     y_size = 800)
6    
7     dc1 = DataCollector(source = Source.XML)
8     dc1.setFileName(file_name =
9     "/home/jongui/data/laurent/subduction/source/function.0271.vtk")
10 jongui 988 #"/home/jongui/data/matt/heat_velocity/source/vel-000659.vtu")
11 jongui 962
12     # Create a map instance for the first viewport.
13     m1 = Map(scene = s, data_collector = dc1, scalar = None,
14     viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
15     m1.setRepresentationToWireframe()
16    
17     # Create a map instance for the second viewport.
18     m2 = Map(scene = s, data_collector = dc1, scalar = None,
19     viewport = Viewport.NORTH_WEST, lut = Lut.COLOR, outline = True)
20     m2.setColor(Color.BLUE)
21    
22     # Create a map instance for the third viewport.
23     m3 = Map(scene = s, data_collector = dc1, scalar = None,
24     viewport = Viewport.NORTH_EAST, lut = Lut.GREY_SCALE, outline = True)
25    
26     # Create a map instance the fourth viewport.
27     m4 = Map(scene = s, data_collector = dc1, scalar = None,
28     viewport = Viewport.SOUTH_EAST, lut = Lut.COLOR, outline = True)
29     m4.setOpacity(0.5)
30    
31     s.render()

  ViewVC Help
Powered by ViewVC 1.1.26