import numpy as np
from sys import argv
import matplotlib.pyplot as plt
#import seaborn as sns

input_file = argv[1]

colr = 'blue'

h=1
ncol = 20
skip=2 # first 2 columns are parameters
# EXEC inputs
for things in argv:
	if len(things.split('='))>1:
		temp = things.split('=')
		#outname+='_%s=%s' % (temp[0],temp[1])
		try:
			exec(things)
		except:
			temp[1] = str(temp[1])
			exec('%s=\'%s\'' % (temp[0],temp[1]))


#data = np.loadtxt(input_file,max_rows=ncol+2)
fp = open(input_file,'r')
text = fp.readlines()

data = []
i=0
for lines in text:
	if i >= ncol:
		break
	row = []
	temp = lines.split()
	for things in temp:
		row.append(float(things))
	if len(row)<3:
		continue
	if max(row[2:]) < 3e3:
		continue
	data.append(row[2:])
	i+=1
	
	


pruned_data = data
tncells = len(pruned_data)


linesizes=[]
colors = []
for i in range(tncells):
	linesizes.append(h)
	colors.append(colr)
	
	
ax = plt.eventplot(pruned_data,color=colors,linelengths=linesizes)

plt.show()


