~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to src/demo/scripting/pydolfin/solvers/elasticity-updated/direct/plot.py

  • Committer: Anders Logg
  • Date: 2007-01-10 09:04:44 UTC
  • mfrom: (1689.1.221 trunk)
  • Revision ID: logg@simula.no-20070110090444-ecyux3n1qnei4i8h
RemoveĀ oldĀ head

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Load mayavi
 
2
from mayavi import *
 
3
 
 
4
# Plot solution
 
5
v = mayavi()
 
6
d = v.open_vtk_xml("solution000000.vtu")
 
7
 
 
8
f = v.load_filter('WarpVector', config=0) 
 
9
 
 
10
m = v.load_module("BandedSurfaceMap")
 
11
m.actor.GetProperty().SetColor((0.8, 0.8, 1.0))
 
12
 
 
13
camera = v.renwin.camera
 
14
camera.Zoom(1.0)
 
15
camera.SetPosition(5.0, 5.0, 20.0)
 
16
camera.SetFocalPoint(3.0, -3.0, 0.0)
 
17
camera.SetRoll(0.0)
 
18
 
 
19
# Turn on sweeping
 
20
d.sweep_delay.set(0.01)
 
21
d.sweep_var.set(1)
 
22
d.do_sweep()
 
23
 
 
24
# Wait until window is closed
 
25
v.master.wait_window()