@@ -449,19 +449,23 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
449
449
** kwargs
450
450
):
451
451
"""
452
- Create a new figure.
452
+ Create a new figure, or activate an existing figure .
453
453
454
454
Parameters
455
455
----------
456
456
num : int or str, optional
457
- If not provided, a new figure will be created, and the figure number
458
- will be incremented. The figure objects holds this number in a `number`
459
- attribute.
460
- If num is provided, and a figure with this id already exists, make
461
- it active, and returns a reference to it. If this figure does not
462
- exists, create it and returns it.
463
- If num is a string, the window title will be set to this figure's
464
- *num*.
457
+ A unique identifier for the figure.
458
+
459
+ If a figure with that identifier already exists, this figure is made
460
+ active and returned. An integer refers to the ``Figure.number``
461
+ attribute, a string refers to the figure label.
462
+
463
+ If there is no figure with the identifier or *num* is not given, a new
464
+ figure is created, made active and returned. If *num* is an int, it
465
+ will be used for the ``Figure.number`` attribute, otherwise, an
466
+ auto-generated integer value is used (starting at 1 and incremented
467
+ for each new figure). If *num* is a string, the figure label and the
468
+ window title is set to this value.
465
469
466
470
figsize : (float, float), default: :rc:`figure.figsize`
467
471
Width, height in inches.
0 commit comments