Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b6c490

Browse files
committed
FIX: properly check figure on gridspec
1 parent dec272c commit 9b6c490

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/gridspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def subplots(self, *, sharex=False, sharey=False, squeeze=True,
293293
.pyplot.subplot
294294
"""
295295

296-
figure = self[0, 0].get_topmost_subplotspec().get_gridspec().figure
296+
figure = self.figure
297297

298298
if figure is None:
299299
raise ValueError("GridSpec.subplots() only works for GridSpecs "

0 commit comments

Comments
 (0)