# -*- coding: utf-8 -*- import numpy as np #import numpy import operator import matplotlib.pyplot as plt #import matplotlib from matplotlib import rcParams rcParams['mathtext.default'] = 'regular' def f(E): return 2*np.sqrt(E) def main(): #set up the final plot fig = plt.figure(figsize=(11.5,8.5)) ax1 = fig.add_subplot(1,1,1) #t1 = np.arange(1e18, 2e19, 100) t1= np.array([1e7,1e8,1e9,1e10,1e10,1e11,1e12]) ax1.plot(t1, f(t1), 'b-',linewidth=5) #make a vertical line ax1.axhline(y=14e3,color='r',linewidth=3) #ax1.axvline(x=600,ymin=0, ymax = 0.84, color='r') ax1.text(0.38, 0.33, 'LHC at 14 TeV', verticalalignment='bottom', horizontalalignment='left', transform=ax1.transAxes, color='red', fontsize=25) sizer = 25 ax1.set_xlabel('Incident Neutrino Energy (GeV)',size=sizer,fontweight='bold') #give it a title ax1.set_ylabel('Collider COM Energy (GeV)',size=sizer,fontweight='bold') ax1.set_xlim([1e6,1e13]) #set the x limits of the plot ax1.set_ylim([1e3,5e6]) #set the y limits of the plot ax1.tick_params(labelsize=sizer) ax1.xaxis.set_tick_params(pad=8) ax1.set_yscale('log') ax1.set_xscale('log') ax1.set_yticks([1e4,1e5,1e6]) #handles, labels = ax1.get_legend_handles_labels() #ax1.legend(handles[::-1], labels[::-1]) #ax1.legend(handles[0],handles[1]) #ax1.legend() #plt.legend(bbox_to_anchor=(0.9, 0.9), bbox_transform=plt.gcf().transFigure) fig.savefig('collider_vs_neutrino.pdf',edgecolor='none') #save the figure #actually execute the main function main()