-
Notifications
You must be signed in to change notification settings - Fork 0
/
UncertaintyofEndUsers_Groups_resultVisualisation.py
95 lines (55 loc) · 3.33 KB
/
UncertaintyofEndUsers_Groups_resultVisualisation.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import matplotlib.pyplot as plt
from matplotlib import pyplot as plt
import math
from sklearn.model_selection import train_test_split
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
maxncing=20
font = FontProperties()
font.set_family('serif')
font.set_name('Arial')
font.set_size(12)
font.set_weight('bold')
data_Vis_groups = pd.read_csv("C:/Omid/data_Vis_groups.csv")
sns.set(style="whitegrid", font="Arial", rc={"font.size": 12}) # Set the style of the plot
sns.lineplot(data=data_Vis_groups, x="EUU", y="Cov", errorbar=("pi",95), err_style="band", color='blue') # Create the line plot
sns.lineplot(data=data_Vis_groups, x="EUU", y="Cov", errorbar=("pi",75), err_style="band", color='blue') # Create the line plot
sns.lineplot(data=data_Vis_groups, x="EUU", y="Cov", errorbar=("pi",50), err_style="band", color='blue') # Create the line plot
plt.xlabel("End user resolution", fontproperties=font) # Add a label to the x-axis (replace with your label)
plt.ylabel("CoV", fontproperties=font) # Add a label to the x-axis (replace with your label)
plt.yticks(fontsize=12)
#plt.xlim(1,maxncing)
plt.xlim(1/maxncing,1)
plt.xticks(fontsize=12)
# Customize font properties for axis tick labels
plt.xticks(fontname="Arial", fontsize=10, weight="bold") # Adjust the size as needed
plt.yticks(fontname="Arial", fontsize=10, weight="bold") # Adjust the size as needed
plt.rc('axes', titlesize=14) # fontsize of the axes title
plt.rc('axes', labelsize=14) # fontsize of the x and y
plt.savefig('CoV_EndUser_res.png', format="png", dpi=600, bbox_inches='tight')
plt.show() # Display the plot
####################################
import matplotlib.ticker as ticker
sns.set(style="whitegrid", font="Arial", rc={"font.size": 12}) # Set the style of the plot
sns.lineplot(data=data_Vis_groups, x="ncing", y="Cov", errorbar=("pi",95), err_style="band", color='blue') # Create the line plot
sns.lineplot(data=data_Vis_groups, x="ncing", y="Cov", errorbar=("pi",75), err_style="band", color='blue') # Create the line plot
sns.lineplot(data=data_Vis_groups, x="ncing", y="Cov", errorbar=("pi",50), err_style="band", color='blue') # Create the line plot
plt.xlabel("Number of aggregated end users", fontproperties=font) # Add a label to the x-axis (replace with your label)
plt.ylabel("CoV", fontproperties=font) # Add a label to the x-axis (replace with your label)
plt.yticks(fontsize=12)
#plt.xlim(1,maxncing)
plt.xlim(1,maxncing)
plt.xticks(fontsize=12)
# Set the x-axis tick locator to display integer values only
plt.gca().xaxis.set_major_locator(ticker.MaxNLocator(integer=True))
# Customize font properties for axis tick labels
plt.xticks(fontname="Arial", fontsize=10, weight="bold") # Adjust the size as needed
plt.yticks(fontname="Arial", fontsize=10, weight="bold") # Adjust the size as needed
plt.rc('axes', titlesize=14) # fontsize of the axes title
plt.rc('axes', labelsize=14) # fontsize of the x and y
plt.savefig('CoV_enduser.png', format="png", dpi=600, bbox_inches='tight')
plt.show() # Display the plot