Changeset 1280 for trunk/UTIL
- Timestamp:
- Jun 2, 2014, 11:19:13 PM (10 years ago)
- Location:
- trunk/UTIL/PYTHON/planetoplot_v2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/planetoplot_v2/pp.py
r1279 r1280 80 80 parser.add_option('--nxticks',action='append',dest='nxticks',type="float",default=None,help="ticks for x axis [not for 2D map]") 81 81 parser.add_option('--nyticks',action='append',dest='nyticks',type="float",default=None,help="ticks for y axis [not for 2D map]") 82 parser.add_option('--xp',action='store',dest='xp',type="int",default=None,help="x size of figure (integer)") 83 parser.add_option('--yp',action='store',dest='yp',type="int",default=None,help="y size of figure (integer)") 82 84 # -- 1D plot 83 85 parser.add_option('-L','--linestyle',action='append',dest='linestyle',type="string",default=None,help="[1D] linestyle: '-' '--' '.' '..'") … … 97 99 parser.add_option('-M','--vmax',action='append',dest='vmax',type="float",default=None,help='[2D] float: maximum value for displayed field') 98 100 parser.add_option('-W','--wscale',action='append',dest='wscale',type="float",default=None,help='[2D] float: set size of reference wind vector') 99 parser.add_option('--svx',action='store',dest='svx',type="int",default= 1,help="Define an abscissa stride on vectors only -- not on field")100 parser.add_option('--svy',action='store',dest='svy',type="int",default= 1,help="Define an ordinate stride on vectors only -- not on field")101 parser.add_option('--svx',action='store',dest='svx',type="int",default=None,help="Define an abscissa stride on vectors only -- not on field") 102 parser.add_option('--svy',action='store',dest='svy',type="int",default=None,help="Define an ordinate stride on vectors only -- not on field") 101 103 parser.add_option('--cbticks',action='append',dest='cbticks',type="float",default=None,help="ticks for colorbar") 102 104 ########################### … … 142 144 user.svx = opt.svx ; user.svy = opt.svy 143 145 user.savtxt = opt.savtxt 146 if opt.xp is not None: user.xp = opt.xp 147 if opt.yp is not None: user.yp = opt.yp 144 148 # define field 145 149 user.define() -
trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py
r1279 r1280 162 162 sx=1,sy=1,\ 163 163 sz=1,st=1,\ 164 svx= 1,\165 svy= 1,\164 svx=None,\ 165 svy=None,\ 166 166 compute="mean",\ 167 167 kind3d="tyx",\ … … 182 182 nxticks=10,nyticks=10,\ 183 183 proj=None,\ 184 blat=None,\ 185 blon=None,\ 186 wscale=None,\ 184 187 vmin=None,vmax=None,\ 185 188 div=None,\ … … 251 254 self.ymin = ymin ; self.ymax = ymax 252 255 self.proj = proj 256 self.blat = blat ; self.blon = blon 257 self.wscale = wscale 253 258 self.vmin = vmin ; self.vmax = vmax 254 259 self.div = div … … 308 313 self.ylabel = other.ylabel ; self.ycoeff = other.ycoeff 309 314 self.proj = other.proj 315 self.blat = other.blat ; self.blon = other.blon 316 self.wscale = other.wscale 310 317 self.vmin = other.vmin ; self.vmax = other.vmax 311 318 self.xmin = other.xmin ; self.xmax = other.xmax … … 884 891 plobj.svx = self.svx 885 892 plobj.svy = self.svy 893 plobj.blat = self.blat 894 plobj.blon = self.blon 895 plobj.wscale = self.wscale 886 896 # -- light grey background for missing values 887 897 if type(plobj.f).__name__ in 'MaskedArray': plobj.axisbg = '0.75' -
trunk/UTIL/PYTHON/planetoplot_v2/ppplot.py
r1279 r1280 435 435 mpl.xlabel(self.ylabel) 436 436 mpl.ylabel(self.xlabel) 437 mpl.title(self.title )437 mpl.title(self.title,y=1.01) # raise a little bit for subscript 438 438 # if masked array, set masked values to filled values (e.g. np.nan) for plotting purposes 439 439 if type(self.f).__name__ in 'MaskedArray': … … 614 614 showcb=True,\ 615 615 wscale=None,\ 616 svx= 1,\617 svy= 1,\616 svx=3,\ 617 svy=3,\ 618 618 leftcorrect=False,\ 619 619 colorvec="black"): … … 903 903 # vectors on map projection or simple 2D mapping 904 904 if self.mapmode: 905 [vecx,vecy] = m.rotate_vector(self.vx,self.vy,self.x,self.y) # for metwinds only ? 905 try: 906 [vecx,vecy] = m.rotate_vector(self.vx,self.vy,self.x,self.y) # for metwinds only ? 907 except: 908 print "!! ERROR !! Problem with field shapes for vector?" 909 print self.vx.shape,self.vy.shape,self.x.shape,self.y.shape 910 exit() 906 911 else: 907 912 vecx,vecy = self.vx,self.vy
Note: See TracChangeset
for help on using the changeset viewer.