Python Examples - PyPlot

#!/usr/bin/python3
# -------------------------------------------------------------------
# code example found on the web
# -------------------------------------------------------------------

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(-3, 3, 30)
y = x**2

plt.plot(x, y)
plt.show()

#!/usr/bin/python3
# -------------------------------------------------------------------
# code example found on the web
# -------------------------------------------------------------------

import matplotlib.pyplot as plt

plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()