-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMathPlotLib.py
More file actions
35 lines (33 loc) · 1.92 KB
/
MathPlotLib.py
File metadata and controls
35 lines (33 loc) · 1.92 KB
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
import matplotlib.pyplot as mp
import numpy as np
x = np.array([3, 6, 1, 7, 8])
y = np.array([3, 6, 3, 2, 5])
# mp.plot(x) #Plot values of x on y axis and index of x axis
# mp.plot(x,y)
# mp.plot(x,x**2)
# mp.plot(x,x**3)
# mp.show() #Plot all graph before this line
r = np.arange(0, 10, 0.01) # range from 0 to 10 with gap of 0.01
# mp.plot(r,np.sin(r))
# mp.plot(r,np.cos(r))
# mp.show()
# mp.scatter(x, y, r) # Plot points not line, m
# cost = [-0.19570923, -0.18344601, 23.45043371, - 0.19571215, - 0.19571215, - 0.19571215,
# - 0.19571215, - 0.19571215 - 0.19571215, - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215, - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215, - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215, - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215, - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215, - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215, - 0.19571215 - 0.19571215 - 0.19571215 /
# -0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215
# - 0.19571215 - 0.19571215 - 0.19571215 - 0.19571215]
# mp.plot(cost)
mp.show()