Use fig.delaxes
or plt.delaxes
to remove unwanted subplots
fig, axs = plt.subplots(1,3)
axs[0].plot([1,2],[3,4])
axs[2].plot([0,1],[2,3])
fig.delaxes(axs[1])
plt.draw()
plt.tight_layout()
More Related Contents:
- matplotlib: can I create AxesSubplot objects, then add them to a Figure instance?
- Setting different color for each series in scatter plot on matplotlib
- _tkinter.TclError: no display name and no $DISPLAY environment variable
- Reverse Y-Axis in PyPlot
- How to manually create a legend
- Defining the midpoint of a colormap in matplotlib
- How to plot multiple functions on the same figure, in Matplotlib?
- find length of sequences of identical values in a numpy array (run length encoding)
- Plotting grouped data in same plot using Pandas
- How to highlight specific x-value ranges
- How to increase/reduce the fontsize of x and y tick labels
- How to convert a .wav file to a spectrogram in python3
- Matplotlib: how to set the current figure?
- Strange error with matplotlib axes labels
- Using Pandas Value_Counts and matplotlib
- How to plot two columns of a pandas data frame using points
- How do I make a single legend for many subplots?
- What does the argument mean in fig.add_subplot(111)?
- Matplotlib plotting in wrong order
- Saving plots (AxesSubPlot) generated from python pandas with matplotlib’s savefig
- How to format axis number format to thousands with a comma
- Creating graph with date and time in axis labels with matplotlib
- scipy.curve_fit() returns multiple lines
- Get data points from Seaborn distplot
- Line plot with arrows in matplotlib
- Plot a 3D surface from {x,y,z}-scatter data
- How to decode color mapping in matplotlib’s Colormap?
- Using pandas crosstab to create a bar plot
- color of a 3D surface plot in python
- matplotlib: render into buffer / access pixel data