/[escript]/trunk/doc/examples/cookbook/heatrefraction001.py
ViewVC logotype

Diff of /trunk/doc/examples/cookbook/heatrefraction001.py

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

revision 2647 by ahallam, Thu Aug 27 04:03:32 2009 UTC revision 2648 by jfenwick, Mon Sep 7 00:06:15 2009 UTC
# Line 41  import numpy as np Line 41  import numpy as np
41  # pylab for matplotlib and plotting  # pylab for matplotlib and plotting
42  import pylab as pl  import pylab as pl
43  # cblib functions  # cblib functions
44  from cblib import toQuivLocs, toXYTuple  from cblib import toQuivLocs, toXYTuple, needdirs
45    
46  ##ESTABLISHING VARIABLES  ##ESTABLISHING VARIABLES
47  qin=70*Milli*W/(m*m) #our heat source temperature is now zero  qin=70*Milli*W/(m*m) #our heat source temperature is now zero
# Line 53  depth=-6000.0*m Line 53  depth=-6000.0*m
53  # note these depen. are generated from heatrefraction_mesher001.py  # note these depen. are generated from heatrefraction_mesher001.py
54  saved_path = "data/heatrefrac001"  saved_path = "data/heatrefrac001"
55    
56    needdirs([saved_path])
57    
58  ###### 2 BLOCK MODEL #########  ###### 2 BLOCK MODEL #########
59  ## DOMAIN  ## DOMAIN
60  ## Anticline  ## Anticline
# Line 122  ziK = pl.matplotlib.mlab.griddata(coordK Line 124  ziK = pl.matplotlib.mlab.griddata(coordK
124  # contour the gridded data, plotting dots at the randomly spaced data points.  # contour the gridded data, plotting dots at the randomly spaced data points.
125    
126  pl.matplotlib.pyplot.autumn()  pl.matplotlib.pyplot.autumn()
127    
128  CKL = pl.fill(tpgx,tpgy,'brown',bpgx,bpgy,'red',zorder=-1000)  CKL = pl.fill(tpgx,tpgy,'brown',bpgx,bpgy,'red',zorder=-1000)
129  #~ CK = pl.contourf(xi,yi,ziK,2)  #~ CK = pl.contourf(xi,yi,ziK,2)
130  CS = pl.contour(xi,yi,zi,5,linewidths=0.5,colors='k')  CS = pl.contour(xi,yi,zi,5,linewidths=0.5,colors='k')
131    
132  pl.clabel(CS, inline=1, fontsize=8)  pl.clabel(CS, inline=1, fontsize=8)
133  pl.title("Heat Refraction across a clinal structure.")  pl.title("Heat Refraction across a clinal structure.")
134  pl.xlabel("Horizontal Displacement (m)")  pl.xlabel("Horizontal Displacement (m)")

Legend:
Removed from v.2647  
changed lines
  Added in v.2648

  ViewVC Help
Powered by ViewVC 1.1.26