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

Skip to content

Commit d79498b

Browse files
committed
make sure all gridspecs have a figure attribute
1 parent 9b6c490 commit d79498b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/matplotlib/gridspec.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ def __init__(self, nrows, ncols,
555555
self._wspace = wspace
556556
self._hspace = hspace
557557
self._subplot_spec = subplot_spec
558+
self.figure = self._subplot_spec.get_gridspec().figure
558559
GridSpecBase.__init__(self, nrows, ncols,
559560
width_ratios=width_ratios,
560561
height_ratios=height_ratios)

0 commit comments

Comments
 (0)