Try using plt.tight_layout
As a quick example:
import matplotlib.pyplot as plt
fig, axes = plt.subplots(nrows=4, ncols=4)
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
plt.show()
Without Tight Layout
With Tight Layout
Related Contents:
- How to plot in multiple subplots
- How to plot multiple dataframes in subplots
- Improve subplot size/spacing with many subplots
- How to have clusters of stacked bars with python (Pandas)
- Stacked Bar Chart with Centered Labels
- plot different color for different categorical levels using matplotlib
- How to plot multiple Seaborn Jointplot in Subplot
- Color by Column Values in Matplotlib
- Python matplotlib multiple bars
- How to add value labels on a bar chart
- How to add hovering annotations to a plot
- How to draw vertical lines on a given plot
- Plot a horizontal line on a given plot
- Seaborn Barplot – Displaying Values
- Plotting grouped data in same plot using Pandas
- How to plot and annotate grouped bars in seaborn / matplotlib
- How to have clusters of stacked bars
- Horizontal stacked bar plot and add labels to each section
- How to display custom values on a bar plot
- How to invert the x or y axis
- How can I make a barplot and a lineplot in the same seaborn plot with different Y axes nicely?
- How to create a grouped bar plot
- Seaborn Bar Plot Ordering
- Plot multiple columns of pandas DataFrame using Seaborn
- Seaborn: countplot() with frequencies
- How to edit properties of whiskers, fliers, caps, etc. in Seaborn boxplot
- How can I group a stacked bar chart?
- How to save a Seaborn plot into a file
- How to plot multiple bars grouped
- Stacked bar chart in Seaborn
- Add image annotations to bar plots
- How do you plot a vertical line on a time series plot in Pandas?
- Subplot for seaborn boxplot
- Background with range on seaborn based on two columns
- plot different color for different categorical levels
- Color a scatter plot by Column Values
- Pandas Dataframe line plot display date on xaxis
- Pandas timeseries plot setting x-axis major and minor ticks and labels
- pyplot common axes labels for subplots
- How to edit a seaborn legend title and labels for figure-level functions
- How to make two plots side-by-side
- Can Pandas plot a histogram of dates?
- How to add percentages on top of grouped bars
- Scatter plot form dataframe with index on x-axis
- pandas 0.21.0 Timestamp compatibility issue with matplotlib
- What are the differences between add_axes and add_subplot?
- Plotting pandas timedelta
- Matplotlib – fixing x axis scale and autoscale y axis
- Getting vertical gridlines to appear in line plot in matplotlib
- pandas DataFrame “no numeric data to plot” error