import matplotlib.pyplot as plt import numpy as np fig, axs = plt.subplots(2, 2) # Line Plot axs[0, 0].plot([1, 2, 3, 4, 5], [2, 5, 3, 7, 11], marker='*', linestyle='-.', color='red') axs[0, 1].bar([1, 2, 3, 4, 5], [2, 3, 5, 7, 11], color='blue') x_scatter = np.random.rand(50) y_scatter = np.random.rand(50) axs[1, 0].scatter(x_scatter, y_scatter, color='green') data_hist = np.random.randn(1000) axs[1, 1].hist(data_hist, bins=30, color='red', alpha=0.7) plt.show()