-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.py
More file actions
23 lines (18 loc) · 851 Bytes
/
plot.py
File metadata and controls
23 lines (18 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import matplotlib.pyplot as plt
def data(xtrain, ytrain, xtest, ytest):
plt.figure(figsize=(12,6))
plt.scatter(xtrain,ytrain,color='blue',label='Training data')
plt.scatter(xtest,ytest,color='green',label ='Testing Data')
plt.show()
def scatterplot(xtrain, ytrain, xtest, ytest, ypred):
plt.figure(figsize=(12,6))
plt.scatter(xtrain,ytrain,color='blue',label='Training data')
plt.scatter(xtest,ytest,color='green',label ='Testing Data')
plt.scatter(xtest,ypred,color = 'red',label = 'Predicted Data')
plt.show()
def lineplot(xtrain, ytrain, xtest, ytest, ypred):
plt.figure(figsize=(12,6))
plt.plot(xtrain,ytrain,color='blue',label='Training data')
plt.plot(xtest,ytest,color='green',label ='Testing Data')
plt.plot(xtest,ypred,color = 'red',label = 'Predicted Data')
plt.show()