Changeset 17617


Ignore:
Timestamp:
04/01/14 10:37:26 (11 years ago)
Author:
cborstad
Message:

CHG: fill nan's by default since matplotlib doesn't handle them

Location:
issm/trunk-jpl/src/m/plot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/plotmodel.py

    r17502 r17617  
    2424        figurenumber=options.figurenumber
    2525        numberofplots=options.numberofplots
     26
     27        #get hold
     28        hold=options.list[0].getfieldvalue('hold',False)
    2629
    2730        #if nlines and ncols specified, then bypass
     
    5255                #handling the 'visible' option will need some check on whether ipython is currently in interactive or non-interactive mode
    5356
    54                 #clear any previous plot window
    55                 p.clf()
     57                if not hold:
     58                        p.clf()
    5659
    5760                #if figsize specified
  • issm/trunk-jpl/src/m/plot/processdata.py

    r17597 r17617  
    4141       
    4242        #process NaN's if any
    43         if options.exist('nan'):
    44                 data[npy.isnan(data)]=options.getfieldvalue('nan',0)
     43        nanfill=options.getfieldvalue('nan',0)
     44        if npy.any(npy.isnan(data)):
     45                data[npy.isnan(data)]=nanfill
     46                print "WARNING: nan's treated as zeros by default.  Change using pairoption 'nan',nan_fill_value in plotmodel call"
    4547
    4648        #non-patch processing
Note: See TracChangeset for help on using the changeset viewer.