/[escript]/trunk/pyvisi/examples/escript_scalarData1D.py
ViewVC logotype

Contents of /trunk/pyvisi/examples/escript_scalarData1D.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 637 - (show annotations)
Thu Mar 23 10:55:31 2006 UTC (14 years, 2 months ago) by gross
File MIME type: text/x-python
File size: 1250 byte(s)
more copyright statements added
1 #!/usr/bin/env python
2
3 """
4 @var __author__: name of author
5 @var __license__: licence agreement
6 @var __copyright__: copyrights
7 @var __url__: url entry point on documentation
8 @var __version__: version
9 @var __date__: date of the version
10 """
11
12 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
13 http://www.access.edu.au
14 Primary Business: Queensland, Australia"""
15 __license__="""Licensed under the Open Software License version 3.0
16 http://www.opensource.org/licenses/osl-3.0.php"""
17 __author__="Paul Cochrane"
18 __url__="http://www.iservo.edu.au/esys"
19 __version__="$Revision$"
20 __date__="$Date$"
21
22
23 from esys.escript import *
24 import esys.finley as fe
25
26 from esys.pyvisi import *
27 from esys.pyvisi.renderers.vtk import *
28
29 online=True
30
31 vectorDomain = fe.Rectangle(9,10)
32 vectorFunctionSpace = escript.ContinuousFunction(vectorDomain)
33 domainData = vectorFunctionSpace.getX()
34
35 # plotting scalar data in a 1D array
36 scalarData1D = sin(domainData[0])
37
38 scene = Scene()
39 plot = LinePlot(scene)
40 plot.setData(scalarData1D)
41 if online: scene.render(pause=True)
42
43 scene.save(fname="escript_scalarData1D_linePlot.png", format="png")
44
45 # what other kinds of plot should I use for this kind of data??
46
47 # vim: expandtab shiftwidth=4:

  ViewVC Help
Powered by ViewVC 1.1.26