#For plotting the HRDs from matplotlib.pyplot import * import matplotlib.pyplot as plt import nugrid_set as set1 #for set1.1 matplotlib.rc('xtick', labelsize=16) matplotlib.rc('ytick', labelsize=16) plt.minorticks_on() mppnp_dir=['M5.00Z1.0e-02'] mesa_dir=mppnp_dir path='/apod2/NuGrid/data/set1' for k in range(len(mppnp_dir)): mesaset1=set1.mesa_set(path+'/set1.1/see_wind',multi_dir=['M5.00Z1.0e-02']) symbs=['o','s','D','+','<','*','p','x'] end_model=20*[-1] linestyle=['--','-','-.',':','-','-.','--',':'] color = ['r','b','g'] label=20*['MESA'] t0_models=mesaset1.set_plot_CO(fig=0,xaxis='age',startfirstTP=True,xtime=False,symbs_1=symbs,color='k',label=label,linestyle=linestyle,markevery=10000,end_model=end_model,savefig='',withoutZlabel=True) #set_plot_CO(self,xaxis='mass',startfirstTP=True,xtime=True,label=[],symbs_1=[],linestyle=[],markevery=500,end_model=[],withoutZlabel=False,savefig='') print 'done mesa' setse2=set1.mppnp_set('/rpod2/critter/',multi_dir=['M5.00Z1.0e-02']) setse2.set_plot_CO_mass(fig=0,t0_model=t0_models,linestyle=['-'],marker=['*'],sparsity=1,xaxis='age',markersparsity=10000,color=['b']) #old decoupled setse2=set1.mppnp_set(path+'/set1.1/ppd_wind',multi_dir=['M5.00Z1.0e-02.standard']) setse2.set_plot_CO_mass(fig=0,t0_model=t0_models,linestyle=[':'],marker=['D'],sparsity=1,xaxis='age',markersparsity=10000,color=['b']) #setse3=set1.mppnp_set('/apod1/critter/set1extension/set1extension_rpod3_not_for_cadc/set1.5a/ppd_wind_nohbb/M4.000Z0.0001' #ax.invert_xaxis() ax=plt.gca() #ax.invert_xaxis() ax.lines[0].set_label('MESA') ax.lines[1].set_label('nested') ax.lines[2].set_label('decoupled') plt.minorticks_on() plt.legend(loc=2,prop={'size':16}) ax.set_xticks([20000,40000,60000,80000]) fig=plt.gcf() fig.savefig('hbb_surface_ratio.png') plt.xlabel('t-t$_0$ [yr]',fontsize=20,labelpad=1) plt.ylabel('surface C/O ratio',fontsize=20,labelpad=1) matplotlib.rc('xtick', labelsize=16) matplotlib.rc('xtick', labelsize=12) matplotlib.rc('xtick', labelsize=10) plt.xlim(0,80000) plt.ylim(0.3,0.55) plt.legend(loc=2,prop={'size':16}) fig.savefig('hbb_surface_ratio_M5Z0p01.png') plt.show()