A Simple Plot

2021-Sep-13, Monday

In [1]:
import numpy as np
import matplotlib.pyplot as plt
In [2]:
x = np.linspace(0, 20, 1001)
In [3]:
y = np.sin(x)
In [4]:
fig = plt.figure()
ax = fig.add_axes([0, 0, 1, 1])

ax.plot(x, y, "-")

ax.set(xlabel="x", ylabel="y")
ax.grid(True)
plt.show()