Changeset 369 for trunk/UTIL/PYTHON
- Timestamp:
- Nov 9, 2011, 4:52:59 PM (14 years ago)
- Location:
- trunk/UTIL/PYTHON
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/UTIL/PYTHON/gcm.py ¶
r363 r369 56 56 parser.add_option('--Mope', action='store',dest='vmaxope', type="float", default=0., help='bounding maximum value for inter-file operation') 57 57 parser.add_option('--titleref', action='store',dest='titref', type="string", default="fill", help='title for the reference file. Default: title of figure (1)') 58 parser.add_option('--xmax', action='store',dest='xmax', type="float", default=None, help='Maximum value for the y-axis in contour-plots. Default is max(xaxis).') 59 parser.add_option('--ymax', action='store',dest='ymax', type="float", default=None, help='Maximum value for the y-axis in contour-plots Default is max(yaxis)') 60 parser.add_option('--xmin', action='store',dest='xmin', type="float", default=None, help='Minimum value for the y-axis in contour-plots. Default is min(xaxis).') 61 parser.add_option('--ymin', action='store',dest='ymin', type="float", default=None, help='Minimum value for the y-axis in contour-plots Default is min(yaxis)') 58 62 parser.add_option('--inverty', action='store_true',dest='inverty', default=False, help='Force matplotlib.pyplot to revert the y-axis. Can be of use when plotting data along pressure levels. (pyplot naturally tend to plot the z-axis with increasing values)') 59 63 … … 200 204 else: 201 205 reffile=opt.fref 206 # Divers #################################################### 207 208 zexaxis=[opt.xmin,opt.xmax] 209 zeyaxis=[opt.ymin,opt.ymax] 202 210 203 211 ############# … … 214 222 outputname=opt.output,resolution=opt.res,\ 215 223 ope=opt.operation,fileref=reffile,minop=opt.vminope,maxop=opt.vmaxope,titleref=opt.titref,\ 216 invert_y=opt.inverty )224 invert_y=opt.inverty,xaxis=zexaxis,yaxis=zeyaxis) 217 225 print 'Done: '+name 218 226 system("rm -f to_be_erased") -
TabularUnified trunk/UTIL/PYTHON/meso.py ¶
r363 r369 46 46 parser.add_option('--title', action='store',dest='zetitle', type="string", default="fill",help='customize the whole title') 47 47 parser.add_option('--inverty', action='store_true',dest='inverty', default=False, help='Force matplotlib.pyplot to revert the y-axis. Can be of use when plotting data along pressure levels. (pyplot naturally tend to plot the z-axis with increasing values)') 48 parser.add_option('--xmax', action='store',dest='xmax', type="float", default=None, help='Maximum value for the y-axis in contour-plots. Default is max(xaxis).') 49 parser.add_option('--ymax', action='store',dest='ymax', type="float", default=None, help='Maximum value for the y-axis in contour-plots Default is max(yaxis)') 50 parser.add_option('--xmin', action='store',dest='xmin', type="float", default=None, help='Minimum value for the y-axis in contour-plots. Default is min(xaxis).') 51 parser.add_option('--ymin', action='store',dest='ymin', type="float", default=None, help='Minimum value for the y-axis in contour-plots Default is min(yaxis)') 48 52 #parser.add_option('-V', action='store', dest='comb', type="float", default=None, help='a defined combination of variables') 49 53 … … 146 150 if vmaxtab[jjj] != -999999: zevmax = vmaxtab[jjj] 147 151 else: zevmax = None 152 153 154 zexaxis=[opt.xmin,opt.xmax] 155 zeyaxis=[opt.ymin,opt.ymax] 156 157 148 158 ############# 149 159 ### Main call … … 157 167 mult=opt.mult,zetitle=opt.zetitle,\ 158 168 slon=zeslon,slat=zeslat,svert=zesvert,stime=zestime,\ 159 outputname=opt.output,resolution=opt.res,invert_y=opt.inverty) 169 outputname=opt.output,resolution=opt.res,\ 170 invert_y=opt.inverty,xaxis=zexaxis,yaxis=zeyaxis) 160 171 print 'Done: '+name 161 172 system("rm -f to_be_erased") -
TabularUnified trunk/UTIL/PYTHON/planetoplot.py ¶
r364 r369 45 45 maxop=0.,\ 46 46 titleref="fill",\ 47 invert_y=False): 47 invert_y=False,\ 48 xaxis=[None,None],\ 49 yaxis=[None,None]): 48 50 49 51 … … 312 314 #contourf(what_I_plot, zelevels, cmap = palette ) 313 315 314 contourf( x, y, what_I_plot, zelevels, cmap = palette ) 316 contourf( x, y, what_I_plot, zelevels, cmap = palette) 317 318 zxmin, zxmax = xaxis 319 zymin, zymax = yaxis 320 if zxmin is not None: 321 mpl.pyplot.xlim(xmin=zxmin) 322 if zxmax is not None: 323 mpl.pyplot.xlim(xmax=zxmax) 324 if zymin is not None: 325 mpl.pyplot.ylim(ymin=zymin) 326 if zymax is not None: 327 mpl.pyplot.ylim(ymax=zymax) 328 315 329 if invert_y: 316 330 lima,limb = mpl.pyplot.ylim()
Note: See TracChangeset
for help on using the changeset viewer.