-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraph.py
More file actions
28 lines (21 loc) · 748 Bytes
/
Copy pathgraph.py
File metadata and controls
28 lines (21 loc) · 748 Bytes
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
import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime
dateparse = lambda x: datetime.strptime(x, '%M:%S')
data = pd.read_csv("performance.csv")
data1 = pd.read_csv("performance_default.csv")
fig, ax = plt.subplots()
l1 = ax.plot(data["files"], data["time"])
ax1 = ax.twinx()
l2 = ax1.plot(data1["files"], data1["time"], color='red')
ax.set_xlabel("Uploaded Files")
ax.set_ylabel("Time")
line_labels = ['Default', 'Worker Scale']
fig.legend([l1, l2], # The line objects
labels=line_labels, # The labels for each line
loc='right', # Position of legend
borderaxespad=0.1, # Small spacing around legend box
fontsize=10
)
fig.tight_layout()
plt.savefig("default.png")