Changeset 13417
- Timestamp:
- 09/21/12 17:47:14 (12 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/plotoptions.py
r13411 r13417 93 93 if not plotnum: continue 94 94 95 # '#all' 95 96 elif 'all' in plotnum: 96 97 for j in xrange(numberofplots): 97 98 self.list[j].addfield(field,rawlist[i][1]) 98 99 100 # '#i-j' 99 101 elif '-' in plotnum: 100 102 nums=plotnum.split('-') -
issm/trunk-jpl/src/m/plot/plot_mesh.py
r13411 r13417 1 1 import pylab as p 2 import matplotlib.tri as tri 2 from processmesh import processmesh 3 from applyoptions import applyoptions 3 4 4 5 def plot_mesh(md,options,nlines,ncols,i): … … 12 13 ''' 13 14 14 #TODO: implement processmesh 15 x=md.mesh.x 16 y=md.mesh.y 17 elements=md.mesh.elements 18 elements=elements-1 #since python indexes from zero 15 x,y,z,elements,is2d=processmesh(md,[],options) 19 16 20 p.subplot(nlines,ncols,i) 21 p.triplot(x,y,elements) 22 p.title('Mesh') 17 if is2d: 18 p.subplot(nlines,ncols,i) 19 p.triplot(x,y,elements) 20 else: 21 print 'WARNING: only 2D mesh plot is currently implemented' 23 22 24 print 'WARNING: options passed to plot_mesh not implemented yet' 23 #apply options 24 options.addfielddefault('title','Mesh') 25 applyoptions(md,[],options) -
issm/trunk-jpl/src/m/plot/plotmodel.py
r13411 r13417 1 1 import pylab as p 2 2 #from pairoptions import * 3 from plotoptions import * 4 from plot_manager import * 3 from plotoptions import plotoptions 4 from plot_manager import plot_manager 5 from math import ceil, sqrt 5 6 6 7 def plotmodel(md,*args): … … 13 14 14 15 #get number of subplots 15 subplotwidth= math.ceil(math.sqrt(options.numberofplots))16 subplotwidth=ceil(sqrt(options.numberofplots)) 16 17 17 18 #if nlines and ncols specified, then bypass … … 44 45 #plots will be visible by default if ipython is run in interactive mode (invoked by ipython --pylab) 45 46 #handling the 'visible' option will need some check on whether ipython is currently in interactive or non-interactive mode 46 p.figure(figurenumber) 47 48 #if figsize specified 49 if options.list[0].exist('figsize'): 50 figsize=options.list[0].getfieldvalue('figsize') 51 p.figure(figurenumber,figsize=figsize) 52 else: 53 p.figure(figurenumber) 54 47 55 48 try:49 50 51 except StandardError:52 print 'error in plot_manager'56 #try: 57 for i in xrange(numberofplots): 58 plot_manager(options.list[i].getfieldvalue('model',md),options.list[i],subplotwidth,nlines,ncols,i) 59 #except StandardError: 60 # print 'error in plot_manager' 53 61 else: 54 62 raise StandardError('plotmodel error message: no output data found.')
Note:
See TracChangeset
for help on using the changeset viewer.