Changeset 372 for trunk/UTIL


Ignore:
Timestamp:
Nov 10, 2011, 10:51:06 AM (13 years ago)
Author:
acolaitis
Message:

PYTHON: small commit to add possibility to do semilog plot along the y axis of 2D contour plots.

Location:
trunk/UTIL/PYTHON
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/gcm.py

    r369 r372  
    6161    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)')
    6262    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)')
    63    
     63    parser.add_option('--logy',         action='store_true',dest='logy',               default=False,  help='Set y-axis to logarithmic.')   
    6464
    6565    ############# T.N. changes
     
    222222                outputname=opt.output,resolution=opt.res,\
    223223                ope=opt.operation,fileref=reffile,minop=opt.vminope,maxop=opt.vmaxope,titleref=opt.titref,\
    224                 invert_y=opt.inverty,xaxis=zexaxis,yaxis=zeyaxis)
     224                invert_y=opt.inverty,xaxis=zexaxis,yaxis=zeyaxis,ylog=opt.logy)
    225225        print 'Done: '+name
    226226        system("rm -f to_be_erased")
  • trunk/UTIL/PYTHON/meso.py

    r369 r372  
    5050    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).')
    5151    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)')
     52    parser.add_option('--logy',         action='store_true',dest='logy',               default=False,  help='Set y-axis to logarithmic.')
    5253    #parser.add_option('-V', action='store', dest='comb',        type="float",   default=None,  help='a defined combination of variables')
    5354
     
    168169                slon=zeslon,slat=zeslat,svert=zesvert,stime=zestime,\
    169170                outputname=opt.output,resolution=opt.res,\
    170                 invert_y=opt.inverty,xaxis=zexaxis,yaxis=zeyaxis)
     171                invert_y=opt.inverty,xaxis=zexaxis,yaxis=zeyaxis,ylog=opt.logy)
    171172        print 'Done: '+name
    172173        system("rm -f to_be_erased")
  • trunk/UTIL/PYTHON/planetoplot.py

    r369 r372  
    4747           invert_y=False,\
    4848           xaxis=[None,None],\
    49            yaxis=[None,None]):
     49           yaxis=[None,None],\
     50           ylog=False):
    5051
    5152
     
    330331                        lima,limb = mpl.pyplot.ylim()
    331332                        mpl.pyplot.ylim(limb,lima)
     333                     if ylog:
     334                        mpl.pyplot.semilogy()
    332335
    333336                 else:
Note: See TracChangeset for help on using the changeset viewer.