#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#  Plot.py
#  
#  Copyright 2014 thomas <thomas@thomas-Notebook>
#  
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#  
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#  MA 02110-1301, USA.
#  


from io import StringIO
from numpy import *
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
plt.rcParams["font.family"] = "serif"
plt.rcParams["mathtext.fontset"] = "cm"

#print tb and Xt
with open('ms_scan_xt0_tb20.dat') as f:
   first_line = f.readline()
first=first_line.split() 
tan_Beta = first[6]
Xt = first[9]
print first[4], first[5], first[6], first[7], first[8], first[9]

data=np.genfromtxt('ms_scan_xt0_tb20.dat', names=True, skip_header=1)
x = data['MS']
fo = data['fo_3l']
eft = data['eft_3l']
feft = data['feft_1l']

fig = plt.figure()
ax1 = fig.add_subplot(111)
ax1.set_xscale('log')
axes = plt.gca()
axes.set_xlim([200,100000])
axes.set_ylim([90,132])
ax1.tick_params(axis='both', direction='in', which='both', labelsize=20)
ax1.yaxis.grid(True, linestyle=':', linewidth=0.5)
ax1.xaxis.grid(True, which='major', linestyle=':', linewidth=0.5)
ax1.set_xlabel('$M_{SUSY}/$GeV', fontsize=25)
ax1.set_ylabel('$M_h/$GeV',fontsize=25)


plt.title(r' $\tan \beta =20$, $\hat X_{t}=0$', fontsize=25, y=1.01) 

linw=2
ax1.plot(x,fo, c='orange', linestyle='none',marker='x', label=r'FO $3\ell$')
ax1.plot(x,eft, c='m', linewidth=linw, label=r'EFT $3\ell$')
ax1.plot(x,feft, c='c', linestyle='--',linewidth=linw, label=r'FEFT $1\ell$')


plt.legend(loc=4,prop={'size':20})  
plt.show()
