It is often necessary to adjust the Matplotlib figure size to better suit a particular data set. For example, data collected over time benefits from a wide figure where signal details are clearer. Alternatively, bar charts are better off being taller so height differences are more obvious.
figsize argument to
plt.figure() to change the figure size.
figsize is a tuple with shape
(width, height) where
height are in inches.
import matplotlib.pyplot as plt # Adjust the figure size here plt.figure(figsize=(7, 2)) plt.title('Wide Figure') plt.show()