Professional Documents
Culture Documents
Plots
Plots
22, 21:49
Plots
You will need 2 libraries: matplotlib.pyplot and numpy.
Then you should get your data and store it in variables in a list.
In [2]: xWerte = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
yWerte = [6.58, 6.08, 7, 6.42, 6.18, 6.3, 5.4, 6.5, 6.41, 6.57, 5.86, 6.27
[<matplotlib.lines.Line2D at 0x7fa156257400>]
Out[4]:
http://localhost:8888/nbconvert/html/Documents/Actual%20School%20shiz/Informatik/Untitled%20Folder/Plots.ipynb?download=false Page 1 of 3
Plots 20.11.22, 21:49
def yessir(x):
y = x**4532342 #the stars define "to the power of...."
return y
x = np.array ([1,2,3,4,5,6,7,8,9])
y = yessir(x)
plt.grid()
plt.plot(x,y)
[<matplotlib.lines.Line2D at 0x7fa15654dcd0>]
Out[6]:
http://localhost:8888/nbconvert/html/Documents/Actual%20School%20shiz/Informatik/Untitled%20Folder/Plots.ipynb?download=false Page 2 of 3
Plots 20.11.22, 21:49
The same principles are used here as well. But here there aren't that many
commands used.
http://localhost:8888/nbconvert/html/Documents/Actual%20School%20shiz/Informatik/Untitled%20Folder/Plots.ipynb?download=false Page 3 of 3