Skip to content

Commit f99ff7e

Browse files
authored
Merge pull request #13105 from anntzer/gridspec-docstring
Make GridSpec.update docstring match behavior.
2 parents 5ad49b4 + ef9e418 commit f99ff7e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/matplotlib/gridspec.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,16 +255,15 @@ def __setstate__(self, state):
255255

256256
def update(self, **kwargs):
257257
"""
258-
Update the current values. If any kwarg is None, default to
259-
the current value, if set, otherwise to rc.
260-
"""
258+
Update the current values.
261259
260+
Values set to None use the rcParams value.
261+
"""
262262
for k, v in kwargs.items():
263263
if k in self._AllowedKeys:
264264
setattr(self, k, v)
265265
else:
266-
raise AttributeError("%s is unknown keyword" % (k,))
267-
266+
raise AttributeError(f"{k} is an unknown keyword")
268267
for figmanager in _pylab_helpers.Gcf.figs.values():
269268
for ax in figmanager.canvas.figure.axes:
270269
# copied from Figure.subplots_adjust

0 commit comments

Comments
 (0)