Changeset 817 for trunk/UTIL/PYTHON/planetoplot.py
- Timestamp:
- Oct 25, 2012, 11:24:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/planetoplot.py
r792 r817 76 76 trycol=False,\ 77 77 streamflag=False,\ 78 nocolorb=False,\ 78 79 analysis=None): 79 80 … … 429 430 ### Open a figure and set subplots 430 431 fig = figure() 431 subv,subh = definesubplot( numplot, fig )432 subv,subh = definesubplot( numplot, fig, ipreferline = (mapmode == 1) ) 432 433 if ope in ['-','-%','-_histo'] and len(namefiles) ==1 : subv,subh = 2,2 433 434 elif ope in ['-','-%'] and len(namefiles)>1 : subv, subh = len(namefiles), 3 … … 464 465 ltst = None 465 466 if typefile in ['meso'] and indextime is not None and len(indextime) < 2: ltst = localtime ( indextime, slon , all_namefile[index_f]) 467 468 469 #if mapmode == 0: 470 # if xlab is None: 471 # if indexlon is None: xlab = "Longitude" 472 # elif indexlat is None: xlab = "Latitude" 473 # if ylab is None: 474 # if indexvert is None: ylab = "Altitude" 475 476 466 477 print "********** INDEX LON:",indexlon," LAT:",indexlat," VERT:",indexvert," TIME:",indextime 467 478 ##var = nc.variables["phisinit"][:,:] … … 547 558 else: palette = get_cmap(name=colorb) 548 559 #palette = cm.GMT_split 560 #palette = cm.GMT_globe 549 561 ##### 1. ELIMINATE 0D or >3D CASES 550 562 if len(what_I_plot.shape) == 0: … … 618 630 if indextime is None and axtime is not None and xlab is None: xlabel(axtime.upper()) ## define the right label 619 631 if save == 'txt': writeascii(np.transpose([x,np.transpose(what_I_plot)]),'profile'+str(nplot*1000+imov)+'.txt') 620 632 if axtime == "lt": 633 ax = mpl.pyplot.gca() 634 # set ticks where your images will be 635 ax.get_xaxis().set_ticks(np.arange(0,48,2)) 636 # rename tick labels 637 ax.get_xaxis().set_ticklabels(["0","2","4","6","8","10","12","14","16","18","20","22",\ 638 "0","2","4","6","8","10","12","14","16","18","20","22"]) 639 ## rebound everyone 640 ax.set_xbound(lower=min(x), upper=max(x)) 621 641 elif which == "xy": 622 642 if lbls is not None: lbl=lbls[index_f] … … 707 727 mpl.pyplot.plot([idx],[idy],'+k',mew=0.5,ms=18) 708 728 709 if colorb not in ['nobar','onebar']: 729 if not nocolorb: 730 if colorb not in ['nobar','onebar']: 710 731 if (fileref is not None) and ((index_f+1)%3 == 0): daformat = "%.3f" 711 732 elif mult != 1: daformat = "%.1f"
Note: See TracChangeset
for help on using the changeset viewer.