From d2ec53b4ef9635056d943576239466e41b90c246 Mon Sep 17 00:00:00 2001
From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Date: Wed, 11 Jul 2018 02:57:38 +0200
Subject: [PATCH] Minor docstring fixes
---
lib/matplotlib/axes/_axes.py | 2 +-
lib/matplotlib/pyplot.py | 10 ++++++++--
lib/matplotlib/stackplot.py | 2 +-
lib/matplotlib/streamplot.py | 2 +-
4 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py
index a0cb6613ce33..5227ce62812a 100644
--- a/lib/matplotlib/axes/_axes.py
+++ b/lib/matplotlib/axes/_axes.py
@@ -273,7 +273,7 @@ def get_legend_handles_labels(self, legend_handler_map=None):
@docstring.dedent_interpd
def legend(self, *args, **kwargs):
"""
- Places a legend on the axes.
+ Place a legend on the axes.
Call signatures::
diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py
index 5f64a7ede616..3096473ca63a 100644
--- a/lib/matplotlib/pyplot.py
+++ b/lib/matplotlib/pyplot.py
@@ -341,7 +341,7 @@ def setp(obj, *args, **kwargs):
def xkcd(scale=1, length=100, randomness=2):
"""
- Turns on `xkcd `_ sketch-style drawing mode.
+ Turn on `xkcd `_ sketch-style drawing mode.
This will only have effect on things drawn after this function is
called.
@@ -410,7 +410,7 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
**kwargs
):
"""
- Creates a new figure.
+ Create a new figure.
Parameters
----------
@@ -575,6 +575,7 @@ def gcf():
def fignum_exists(num):
+ """Return whether the figure with the given id exists."""
return _pylab_helpers.Gcf.has_fignum(num) or num in get_figlabels()
@@ -591,6 +592,11 @@ def get_figlabels():
def get_current_fig_manager():
+ """
+ Return the figure manager of the active figure.
+
+ If there is currently no active figure, a new one is created.
+ """
figManager = _pylab_helpers.Gcf.get_active()
if figManager is None:
gcf() # creates an active figure as a side effect
diff --git a/lib/matplotlib/stackplot.py b/lib/matplotlib/stackplot.py
index 2848d4a5cfa1..d18d3d76531b 100644
--- a/lib/matplotlib/stackplot.py
+++ b/lib/matplotlib/stackplot.py
@@ -15,7 +15,7 @@ def stackplot(axes, x, *args,
labels=(), colors=None, baseline='zero',
**kwargs):
"""
- Draws a stacked area plot.
+ Draw a stacked area plot.
Parameters
----------
diff --git a/lib/matplotlib/streamplot.py b/lib/matplotlib/streamplot.py
index 17ca2cec1f5f..12bcf9159e91 100644
--- a/lib/matplotlib/streamplot.py
+++ b/lib/matplotlib/streamplot.py
@@ -20,7 +20,7 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
cmap=None, norm=None, arrowsize=1, arrowstyle='-|>',
minlength=0.1, transform=None, zorder=None, start_points=None,
maxlength=4.0, integration_direction='both'):
- """Draws streamlines of a vector flow.
+ """Draw streamlines of a vector flow.
*x*, *y* : 1d arrays
an *evenly spaced* grid.