@@ -245,6 +245,7 @@ def switch_backend(newbackend):
245
245
def show (* args , ** kw ):
246
246
"""
247
247
Display a figure.
248
+
248
249
When running in ipython with its pylab mode, display all
249
250
figures and return to the ipython prompt.
250
251
@@ -338,6 +339,11 @@ def gci():
338
339
:class:`~matplotlib.collections.Collection` instances. The
339
340
current image is an attribute of the current axes, or the nearest
340
341
earlier axes in the current figure that contains an image.
342
+
343
+ Notes
344
+ -----
345
+ Historically, the only colorable artists were images; hence the name
346
+ ``gci`` (get current image).
341
347
"""
342
8000
code>
348
return gcf ()._gci ()
343
349
@@ -426,7 +432,6 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
426
432
427
433
Parameters
428
434
----------
429
-
430
435
num : integer or string, optional, default: None
431
436
If not provided, a new figure will be created, and the figure number
432
437
will be incremented. The figure objects holds this number in a `number`
@@ -579,7 +584,12 @@ def _auto_draw_if_interactive(fig, val):
579
584
580
585
581
586
def gcf ():
582
- """Get a reference to the current figure."""
587
+ """
588
+ Get the current figure.
589
+
590
+ If no current figure exists, a new one is created using
591
+ `~.pyplot.figure()`.
592
+ """
583
593
figManager = _pylab_helpers .Gcf .get_active ()
584
594
if figManager is not None :
585
595
return figManager .canvas .figure
@@ -606,9 +616,17 @@ def get_figlabels():
606
616
607
617
def get_current_fig_manager ():
608
618
"""
609
- Return the figure manager of the active figure.
619
+ Return the figure manager of the current figure.
620
+
621
+ The figure manager is a container for the actual backend-depended window
622
+ that displays the figure on screen.
610
623
611
- If there is currently no active figure, a new one is created.
624
+ If if no current figure exists, a new one is created an its figure
625
+ manager is returned.
626
+
627
+ Returns
628
+ -------
629
+ manager : `.FigureManagerBase` or backend-dependent subclass thereof
612
630
"""
613
631
figManager = _pylab_helpers .Gcf .get_active ()
614
632
if figManager is None :
0 commit comments