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

Contents of /trunk/pyvisi/py_src/examples/contour.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 988 - (show annotations)
Tue Feb 20 07:21:12 2007 UTC (12 years, 6 months ago) by jongui
File MIME type: text/x-python
File size: 743 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 from esys.pyvisi import Scene, DataCollector, Contour, Camera
2 from esys.pyvisi.constant import *
3
4 s = Scene(renderer = Renderer.ONLINE, num_viewport = 1, 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 "/home/jongui/trunk/pyvisi/test/python/data_data/interior_3D.xml")
11
12 # Create one contour instance.
13 ctr1 = Contour(scene = s, data_collector = dc1, scalar = "temperature_cell",
14 viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
15 ctr1.generateContours(1, 0.5, 0.5)
16
17 cam1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
18 cam1.elevation(-40)
19
20 s.render()
21

  ViewVC Help
Powered by ViewVC 1.1.26