import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0, 10, 0.2)
y1, y2 = np.sin(x), np.cos(x)
fig, ax = plt.subplots(2, figsize=(9, 6))
ax[0].plot(x, y1)
ax[1].plot(x, y2)
plt.show()
x = np.arange(0, 10, 0.2)
y = np.sin(x)
fig, ax = plt.subplots(1, figsize=(9, 5))
ax.plot(x, y)
ax.set_xlim(0, 6)
ax.set_ylabel('Value')
plt.show()
plt.figure(figsize=(9, 5))
plt.plot(x, y)
plt.xlim(0, 6)
plt.ylabel('Value')
plt.show()
import matplotlib.pyplot as plt
%matplotlib inline