%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
plt.plot([1, 4, 3, 1, 5])
plt.show()
x = np.linspace(0, 10, 101)
y = x**2-6*x-3
plt.plot(x, y)
plt.xlabel('x')
plt.ylabel('y')
x = np.linspace(0, 10, 21)
plt.plot(x, x, 'r^')
plt.plot(x, x**2, '--')
plt.plot(x, x**3, 'go')
plt.plot?
x = np.arange(10)
y = np.array([5, 9, 4, 8, 7, 4, 3, 1, 2, 9])
plt.bar(x, y)
x = np.random.rand(30)
y = np.random.rand(30)
plt.scatter(x, y)
x = np.linspace(0, 5, 21)
plt.figure()
plt.subplot(231)
plt.plot(x, x)
plt.subplot(232)
plt.plot(x, x**2)
plt.subplot(233)
plt.plot(x, x**3)
plt.subplot(234)
plt.plot(x, x**0.5)
plt.subplot(235)
plt.plot(x, x**0.25)
plt.subplot(236)
plt.plot(x, x*2)