Skip to content

Commit ec4fd52

Browse files
committed
DOC: move the **kwargs description to _update_plot_title
Per review: the passthrough was never dropped, it is simply not reachable through ControlPlot.set_plot_title. _update_plot_title is called from outside this module with arguments that land in **kwargs, so that is where the description belongs. It had no docstring, so the entries for its other parameters come from the module: fig from `if fig is None: fig = plt.gcf()`, frame from the wording already used in set_plot_title, and use_existing from the title-merging branch below.
1 parent 9bad931 commit ec4fd52

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

‎control/ctrlplot.py‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ def set_plot_title(self, title, frame='axes'):
197197
Title text.
198198
frame : str, optional
199199
Coordinate frame for centering: 'axes' (default) or 'figure'.
200-
**kwargs : `matplotlib.pyplot.suptitle` keywords, optional
201-
Additional keywords (passed to matplotlib).
202200
203201
"""
204202
_update_plot_title(
@@ -538,6 +536,23 @@ def _make_legend_labels(labels, ignore_common=False):
538536

539537
def _update_plot_title(
540538
title, fig=None, frame='axes', use_existing=True, **kwargs):
539+
"""Set or extend the centered title of a figure.
540+
541+
Parameters
542+
----------
543+
title : str
544+
Title text.
545+
fig : Figure, optional
546+
Matplotlib figure. Defaults to the current figure.
547+
frame : str, optional
548+
Coordinate frame for centering: 'axes' (default) or 'figure'.
549+
use_existing : bool, optional
550+
If True (default), extend the figure's existing title instead of
551+
replacing it.
552+
**kwargs : `matplotlib.pyplot.suptitle` keywords, optional
553+
Additional keywords (passed to matplotlib).
554+
555+
"""
541556
if title is False or title is None:
542557
return
543558
if fig is None:

0 commit comments

Comments
 (0)