-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgraph-plotting.py
51 lines (40 loc) · 1 KB
/
graph-plotting.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
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 19 22:59:25 2018
@author: csedi
"""
from matplotlib import pyplot as plt
import numpy as np
import matplotlib
import pandas as pd
data = pd.read_csv('set.csv')
X=data.iloc[:,3:7].values
y=data.iloc[:,7].values
#Core -0
plt.plot(X[1:10000,0:1],y[1:10000],'bo')
plt.xlabel('CPU 0')
plt.ylabel('Total Cores Required')
plt.show()
#Core-1
plt.plot(X[1:10000,1:2],y[1:10000],'bo')
plt.xlabel('CPU 1')
plt.ylabel('Total Cores Required')
plt.show()
#Core-2
plt.plot(X[1:10000,2:3],y[1:10000],'bo')
plt.xlabel('CPU 2')
plt.ylabel('Total Cores Required')
plt.show()
#Core-3
plt.plot(X[1:10000,3],y[1:10000],'bo')
plt.xlabel('CPU 3')
plt.ylabel('Total Cores Required')
plt.show()
#All in one grapg plots
import matplotlib.pyplot as plt
fig, axs = plt.subplots(2, 2, figsize=(5, 5))
axs[0, 0].plot(X[1:10000,3],y[1:10000],'bo')
axs[1, 0].plot(X[1:10000,2:3],y[1:10000],'bo')
axs[0, 1].plot(X[1:10000,1:2],y[1:10000],'bo')
axs[1, 1].plot(X[1:10000,0:1],y[1:10000],'bo')
plt.show()