In [1]:
import matplotlib.pyplot as plt
%matplotlib inline

In [ ]:
f, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2)
x = np.linspace(0, 2 * np.pi, 400)
y = np.sin(x ** 2)
ax1.plot(x, y)
ax1.set_title('Sharing x per column, y per row')
ax2.scatter(x, y)
ax3.scatter(x, 2 * y ** 2 - 1, color='r')
ax4.plot(x, 2 * y ** 2 - 1, color='r')