Closed
Description
Bug report
Bug summary
plt.subplot
eats my subplots. But it doesn't completely digest them, since they are still there, just not shown.
Creating a subplot grid with plt.subplots
and in addition adding a plt.subplot
removes those subplots from the grid, which are under the newly created subplot.
Creating the additional subplot via fig.add_subplot
does not remove them.
Code for reproduction
import matplotlib.pyplot as plt
fig, ax = plt.subplots(2,3,
subplot_kw={"label" : "A"},
gridspec_kw={'width_ratios':[1,1,3]})
ax[0,2].plot([1,2,3])
axi = plt.subplot(133, label="B")
axi.plot([7,6,5], color="red")
axi.axis("off")
plt.show()
Actual outcome
Expected outcome
The expected outcome would be the same as with fig.add_subplot
:
axi = fig.add_subplot(133, label="B")
axi.plot([7,6,5], color="red")
axi.axis("off")
Matplotlib version
- Operating system: Win 8.1
- Matplotlib version: master
- Matplotlib backend: Qt5Agg
- Python version: 3.6
Metadata
Metadata
Assignees
Labels
No labels