if len(which_to_plot) == 0:
    which_to_plot = [a for a in range(nobs)]

ny = len(which_to_plot) / 2

i_cnt = 0
# print lmin, lmax
print "plotting..."
for i in which_to_plot:
    i_cnt = i_cnt + 1
    # create spectrum summary figure, with absorption line locations overlaid
    ax = fig.add_subplot(ny + 1, 1, i_cnt)
    # ax.tick_params(axis='both', which='major', labelsize=10)
    plt.rcParams["text.usetex"] = "True"
    ax.set_title(raw(labels_to_plot[i_cnt - 1]), fontsize=14)
    ax.plot(wavelength[0:-ibin], smoothspec[i], c="k")
    ax.set_ylabel(raw(ylab))
    ax.set_xlabel(raw(xlab))
    # ax.axvline(x=1550, c='r')
    # plt.text(1550,fmin[i],'CIV',fontsize=6)
    # ax.axvline(x=1032, c='b')
    # ax.axvline(x=1038, c='b')
    # plt.text(1038,fmin[i],'OVI',fontsize=6)
    # ax.axvline(x=1239, c='g')
    # ax.axvline(x=1243, c='g')
    # plt.text(1243,fmin[i],'NV',fontsize=6)
    # ax.axvline(x=1394, c='c')
    # ax.axvline(x=1403, c='c')
    # plt.text(1403,fmin[i],'SiIV',fontsize=6)
    # ax.axvline(x=1026, c='y')
Example #2
0
		which_to_plot=[a for a in range(nobs)]

	ny=len(which_to_plot+1)/2

	i_cnt=0
	#print lmin, lmax
	print 'plotting...'
	for i in which_to_plot:
		i_cnt=i_cnt+1
			#create spectrum summary figure, with absorption line locations overlaid
		ax=fig.add_subplot(ny,1,i_cnt)
		#ax.tick_params(axis='both', which='major', labelsize=10)
		plt.rcParams['text.usetex']='True'
		#plt.lines.set_markeredgecolor('0.1')
		#print plt.rcParams['lines.markeredgecolor']
		ax.set_title(raw(labels_to_plot[i_cnt-1]),fontsize=18)
		ax.plot(wavelength[0:-ibin],smoothspec[i], c='b')
		if comp_mode: ax.plot(wavelength[0:-ibin],smoothspec2[i], c='0.2', linestyle='--')
		ax.set_ylabel(raw('{\rm '+ylab+'}'), fontsize=14)
		ax.set_xlabel(raw(xlab), fontsize=14)
		if vlines:
			ax.axvline(x=1550, c='r')
			plt.text(1550,fmin[i],'CIV',fontsize=6)
			ax.axvline(x=1032, c='b')
			ax.axvline(x=1038, c='b')
			plt.text(1038,fmin[i],'OVI',fontsize=6)	
			ax.axvline(x=1239, c='g')
			ax.axvline(x=1243, c='g')
			plt.text(1243,fmin[i],'NV',fontsize=6)
			ax.axvline(x=1394, c='c')
			ax.axvline(x=1403, c='c')