Changeset 642
- Timestamp:
- Apr 30, 2012, 6:15:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/planetoplot.py
r641 r642 536 536 if nplot > 1: legend(loc='best') 537 537 if indextime is None and axtime is not None and xlab is None: xlabel(axtime.upper()) ## define the right label 538 if save == 'txt': writeascii(np.transpose( what_I_plot),'profile'+str(nplot*1000+imov)+'.txt')538 if save == 'txt': writeascii(np.transpose([x,np.transpose(what_I_plot)]),'profile'+str(nplot*1000+imov)+'.txt') 539 539 540 540 elif which == "regular": … … 581 581 if ope == '-' and nplot == numplot: # this should work as long as ope is '-' guarantees 3 plots for 4 panels without contour 582 582 subplot(subv,subh,nplot+1) 583 rcParams["legend.fontsize"] = 'xx-large' 583 584 if indexlat is None: 584 585 latmin = -50.; latmax = 50. # latitude range for histogram of difference 585 586 zeindexlat = (lat<latmax)*(lat>latmin) 586 if (len(lat) == len(x)) and (len(lat) == len(y)): errormess('PLANETOPLOT.PY: I cant find which axis is lat for histogram.') 587 elif len(lat) == len(x) : what_I_plot_frame = what_I_plot_frame[:,zeindexlat] 588 elif len(lat) == len(y) : what_I_plot_frame = what_I_plot_frame[zeindexlat,:] 589 else: errormess('PLANETOPLOT.PY: indexlat is None, but I cant find the lat axis.') 587 # this follows the define_axis logic in myplot.py: 588 if indextime is None or indexlon is None: what_I_plot_frame = what_I_plot_frame[zeindexlat,:] 589 else: what_I_plot_frame = what_I_plot_frame[:,zeindexlat] 590 590 toplot = np.ravel(what_I_plot_frame[np.isnan(what_I_plot_frame)==False]) 591 591 zebins = np.linspace(zevmin,zevmax,num=30) … … 595 595 zebins = np.linspace(zevmin,zevmax,num=300) 596 596 zegauss = (1./(zestd * np.sqrt(2 * np.pi)) * np.exp( - (zebins - zemean)**2 / (2 * zestd**2) ) ) 597 text(zebins[2],np.max(zegauss),'mean: '+str(zemean)[0:5]+'\nstd: '+str(zestd)[0:5],fontsize = 12)598 plot(zebins, zegauss, linewidth=1, color='r')597 plot(zebins, zegauss, linewidth=1, color='r',label="mean: "+str(zemean)[0:5]+"\nstd: "+str(zestd)[0:5]) 598 legend(loc=0,frameon=False) 599 599 title("Histogram fig(1) "+ope+" fig(2)") 600 600 subplot(subv,subh,nplot) # go back to last plot for title of contour difference 601 601 602 602 elif which == "contour": 603 603 zevminc, zevmaxc = calculate_bounds(what_I_plot_frame, vmin=min(what_I_plot_frame), vmax=max(what_I_plot_frame))
Note: See TracChangeset
for help on using the changeset viewer.