/
boxplot_ops_br_plt.py
25 lines (24 loc) · 996 Bytes
/
boxplot_ops_br_plt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import numpy as np
import matplotlib.pyplot as pyplot
import pandas as pd
import seaborn as sns
data=pd.read_csv('browsertime.csv')
result=data
result['protocol'].replace(["HTTP1.1/TLS","HTTP2"],
["H1s","H2"],inplace=True)
result["pageLoadTime"]=result["pageLoadTime"]/1000
brs=result.browser.unique()
for br in brs:
pyplot.clf()
sns.set_context('paper')
pyplot.figure(figsize=(18, 10))
sns.set(font_scale=2.2)
#sns.set_style("white")
g=sns.boxplot(x="Ops", y="pageLoadTime", hue="protocol",data=result[(result.browser==br)],
order=["Telia (SE)", "Telenor (SE)", "Tre (SE)", "Telenor (NO)", "Telia (NO)", "ICE (NO)", "TIM (IT)",
"Vodafone (IT)", "Wind (IT)","Orange (ES)","Yoigo (ES)"],hue_order=["H1s","H2"],palette="muted",showfliers=False)
pyplot.xticks(rotation=10)
pyplot.title(br)
pyplot.ylabel("PLT")
pyplot.xlabel("Operators")
pyplot.savefig("final_graphs/"+br+"-plt.pdf")