-
Notifications
You must be signed in to change notification settings - Fork 0
/
antipode-rendezvous.py
executable file
·41 lines (32 loc) · 1.16 KB
/
antipode-rendezvous.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
#!/usr/bin/env python3
from pprint import pprint as pp
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
sns.set_theme(style='ticks')
plt.figure(figsize=(10, 18), dpi=450)
plt.rcParams['axes.labelsize'] = 'small'
data = {
'Application Size': np.linspace(10, 100),
'Performance (Antipode)': np.linspace(10, 100)**2 + 5,
}
intercept_point = data['Performance (Antipode)'][2*len(data['Performance (Antipode)']) // 3]
data['Performance (Rendezvous)'] = -(np.linspace(10, 100)**2 + 5) + 2 * intercept_point
df = pd.DataFrame(data)
# remove x and y ticks
plt.xticks([])
plt.yticks([])
plt.ylabel('y')
plt.xlabel('x')
ax = sns.lineplot(data=df, x='Application Size', y='Performance (Antipode)', label='Antipode', linewidth = 3)
ax = sns.lineplot(data=df, x='Application Size', y='Performance (Rendezvous)', label='Rendezvous', linewidth = 3)
plt.xlabel('- Application Size +')
plt.ylabel('- Performance +')
# move the legend to the top right corner
plt.legend(loc='upper right', bbox_to_anchor=(1.0, 1.0), fontsize='small')
# set x axis limit
plt.xlim(0, 120)
plt.show()
#plt.savefig("antipode-vs-rendezvous")
#print(f"[INFO] Saved plot")