@@ -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
@@ -335,6 +336,11 @@ def gci():
335
336
336
337
The current image is an attribute of the current axes, or the nearest
337
338
earlier axes in the current figure that contains an image.
339
+
340
+ Notes
341
+ -----
342
+ Historically, the only colorable artists were images; hence the name
343
+ ``gci`` (get current image).
338
344
"""
339
345
return gcf ()._gci ()
340
346
@@ -423,7 +429,6 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
423
429
424
430
Parameters
425
431
----------
426
-
427
432
num : integer or string, optional, default: None
428
433
If not provided, a new figure will be created, and the figure number
429
434
will be incremented. The figure objects holds this number in a `number`
@@ -576,7 +581,12 @@ def _auto_draw_if_interactive(fig, val):
576
581
577
582
578
583
def gcf ():
579
- """Get a reference to the current figure."""
584
+ """
585
+ Get the current figure.
586
+
587
+ If no current figure exists, a new one is created using
588
+ `~.pyplot.figure()`.
589
+ """
580
590
figManager = _pylab_helpers .Gcf .get_active ()
581
591
if figManager is not None :
582
592
return figManager .canvas .figure
@@ -602,7 +612,19 @@ def get_figlabels():
602
612
603
613
604
614
def get_current_fig_manager ():
605
- """Return ``gcf().canvas.manager``, the current figure's manager."""
615
+ """
616
+ Return the figure manager of the current figure.
617
+
618
+ The figure manager is a container for the actual backend-depended window
619
+ that displays the figure on screen.
620
+
621
+ If if no current figure exists, a new one is created an its figure
622
+ manager is returned.
623
+
624
+ Returns
625
+ -------
626
+ manager : `.FigureManagerBase` or backend-dependent subclass thereof
627
+ """
606
628
return gcf ().canvas .manager
607
629
608
630
0 commit comments