/[escript]/trunk/doc/examples/usersguide/poisson_matplotlib.py
ViewVC logotype

Diff of /trunk/doc/examples/usersguide/poisson_matplotlib.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2599 by jfenwick, Tue Aug 4 04:05:36 2009 UTC revision 2600 by jfenwick, Fri Aug 7 04:47:49 2009 UTC
# Line 25  from esys.finley import Rectangle Line 25  from esys.finley import Rectangle
25  import numpy  import numpy
26  import matplotlib  import matplotlib
27    
28    matplotlib.use('agg')   #For interactive use, you can comment out this line
29    #It's just here to make testing easier
30    
31  import pylab  import pylab
32    
33  #Testing whether we have a late enough version of matplotlib  #Testing whether we have a late enough version of matplotlib
# Line 51  try: Line 54  try:
54      matplotlib.pyplot.contourf(x_grid, y_grid, z_grid, 5)      matplotlib.pyplot.contourf(x_grid, y_grid, z_grid, 5)
55      matplotlib.pyplot.savefig("u.png")      matplotlib.pyplot.savefig("u.png")
56      # uncommend this line if you want to interact with a plot window      # uncommend this line if you want to interact with a plot window
57      matplotlib.pyplot.show()      #matplotlib.pyplot.show()
58    
59  except AttributeError:  except AttributeError:
60      print "Your version of matplotlib does not provide the griddata method.\nSkipping example.\n"      print "Your version of matplotlib does not provide the griddata method.\nSkipping example.\n"

Legend:
Removed from v.2599  
changed lines
  Added in v.2600

  ViewVC Help
Powered by ViewVC 1.1.26