From cb080a39e4da918883b03b33ccad41f9b310bacb Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Thu, 13 Nov 2014 09:11:11 +0000 Subject: [PATCH] Fix Sphinx warning in widgets And improve the rendering of the docstring somewhat. --- lib/matplotlib/widgets.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index 945db5802dc2..8c22bc899537 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -1255,7 +1255,7 @@ def onselect(vmin, vmax): span = SpanSelector(ax, onselect, 'horizontal') *onmove_callback* is an optional callback that is called on mouse - move within the span range + move within the span range """ @@ -1275,6 +1275,7 @@ def __init__(self, ax, onselect, direction, minspan=None, useblit=False, If *minspan* is not *None*, ignore events smaller than *minspan* The span rectangle is drawn with *rectprops*; default:: + rectprops = dict(facecolor='red', alpha=0.5) Set the visible attribute to *False* if you want to turn off @@ -1283,7 +1284,7 @@ def __init__(self, ax, onselect, direction, minspan=None, useblit=False, If *span_stays* is True, the span stays visble after making a valid selection. - *button* is a list of integers indicating which mouse buttons should + *button* is a list of integers indicating which mouse buttons should be used for selection. You can also specify a single integer if only a single button is desired. Default is *None*, which does not limit which button can be used. @@ -1292,6 +1293,7 @@ def __init__(self, ax, onselect, direction, minspan=None, useblit=False, 1 = left mouse button 2 = center mouse button (scroll wheel) 3 = right mouse button + """ _SelectorWidget.__init__(self, ax, onselect, useblit=useblit, button=button)