-
Created by Unknown User (jonakaa), last modified on 12.06.2019
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 5
Next »
Simple plot
import numpy as np
import matplotlib.pyplot as plt
# Evenly sampled time from 0s to 10s at 200ms intervals
t = np.arange(0.0, 10.0, 0.2)
# Plotting t at x-axis and sin(t) at y-axis
plt.plot(t, np.sin(t))
# Naming the title and both axis
plt.title('Sinus function')
plt.ylabel('sin(t)')
plt.xlabel('t [s]')
# Need to call the show() function at the end to display my figure
plt.show()
![](/wiki/download/attachments/146605768/Simple%20plot.png?version=1&modificationDate=1560334640000&api=v2)