Open main menu

Changes

Matplotlib DPL94 R1rho R2eff

441 bytes added, 15:39, 15 March 2014
# You have to provide a DPL94 results state file
res_folder = "resultsR1"
#res_folder = "results_clustering"
res_state = os.path.join(res_folder, "DPL94", "results")
spin_inte = ":52@N"
## Define labels for plotting
plotlabel_R1_rho_R2eff filesave_R1_rho_R2eff = 'R1_rho_R2eff'plotlabel_R1_rho filesave_R1_rho = 'R1_rho'
# For writing math in matplotlib, see# http://matplotlib.org/1.3.1/users/mathtext.html ylabel_R1_rho = r'R1_rho R$_{1\rho}$ [rad.s$^{-1}$]'ylabel_R1_rho_R2eff = r'R1_rho_R2eff R$_{1\rho, R_{2,eff}}$ [rad.s$^{-1}$]'
xlabel_theta = 'Rotating frame tilt angle [rad]'
xlabel_w_eff = r'Effective field in rotating frame [rad.s$^{-1}$]'
xlabel_lock = 'Spin-lock field strength [Hz]'
 
# Set image inches size
img_inch_x = 12
img_inch_y = img_inch_x / 1.6
legend_size = 6
 
# Plot values in dic
for offset, val_dics in offset_dic.items():
# General plot label
graphlabel = "%3.1f_%3.3f3f_meas"%(frq/1E6, offset)
graphlabel_bc = "%3.1f_%3.3f_bc"%(frq/1E6, offset)
graphlabel_inter = "%3.1f_%3.3f_inter"%(frq/1E6, offset)
# Define settings for each graph
# Plot 1: R1_rho as function of theta.
fig1 = plt.figure(1)
plt.xlabel(xlabel_theta)
plt.ylabel(ylabel_R1_rho)
plt.legend(loc='best', prop={'size':legend_size})
plt.grid(True)
plt.ylim([0,16])
plt.title("%s \n %s as function of %s"%(spin_inte, ylabel_R1_rho, xlabel_theta))
#fig1.set_size_inches(img_inch_x, img_inch_y)plt.savefig("matplotlib_%s_%s_theta_sep.png"%(spin_inte_rep, plotlabel_R1_rhofilesave_R1_rho) )
## Plot 2: R1_rho_R2eff as function of w_eff
fig2 = plt.figure(2)
plt.xlabel(xlabel_w_eff)
plt.ylabel(ylabel_R1_rho_R2eff)
plt.legend(loc='best', prop={'size':legend_size})
plt.grid(True)
plt.ylim([0,16])
plt.xlim([0,20000])
plt.title("%s \n %s as function of %s"%(spin_inte, ylabel_R1_rho_R2eff, xlabel_w_eff))
#fig2.set_size_inches(img_inch_x, img_inch_y)plt.savefig("matplotlib_%s_%s_w_eff.png"%(spin_inte_rep, plotlabel_R1_rho_R2efffilesave_R1_rho_R2eff) )
## Plot 3: R1_rho as function of as function of disp_point, the Spin-lock field strength
fig3 = plt.figure(3)
plt.xlabel(xlabel_lock)
plt.ylabel(ylabel_R1_rho)
plt.legend(loc='best', prop={'size':legend_size})
plt.grid(True)
plt.ylim([0,16])
plt.title("%s \n %s as function of %s"%(spin_inte, ylabel_R1_rho, xlabel_lock))
#fig3.set_size_inches(img_inch_x, img_inch_y)plt.savefig("matplotlib_%s_%s_w_effs_disp.png"%(spin_inte_rep, plotlabel_R1_rho_R2efffilesave_R1_rho_R2eff) )
plt.show()