Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix small typo in documentation about CheckButtons. #5484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 24, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions 62 lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
GUI Neutral widgets
GUI neutral widgets
===================

Widgets that are designed to work for any of the GUI backends.
All of these widgets require you to predefine an :class:`matplotlib.axes.Axes`
All of these widgets require you to predefine a :class:`matplotlib.axes.Axes`
instance and pass that as the first arg. matplotlib doesn't try to
be too smart with respect to layout -- you will have to figure out how
wide and tall you want your Axes to be to accommodate your widget.
Expand All @@ -30,9 +30,9 @@ class LockDraw(object):
desirable under all circumstances, like when the toolbar is in
zoom-to-rect mode and drawing a rectangle. The module level "lock"
allows someone to grab the lock and prevent other widgets from
drawing. Use ``matplotlib.widgets.lock(someobj)`` to pr
drawing. Use ``matplotlib.widgets.lock(someobj)`` to prevent
other widgets from drawing while you're interacting with the canvas.
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh, I remember adding that comment as a bit of a joke...

# FIXME: This docstring ends abruptly without...

def __init__(self):
self._owner = None
Expand Down Expand Up @@ -124,7 +124,7 @@ def connect_event(self, event, callback):
"""Connect callback with an event.

This should be used in lieu of `figure.canvas.mpl_connect` since this
function stores call back ids for later clean up.
function stores callback ids for later clean up.
"""
cid = self.canvas.mpl_connect(event, callback)
self.cids.append(cid)
Expand All @@ -139,8 +139,7 @@ class Button(AxesWidget):
"""
A GUI neutral button.

For the button to remain responsive
you must keep a reference to it.
For the button to remain responsive you must keep a reference to it.

The following attributes are accessible

Expand Down Expand Up @@ -244,9 +243,10 @@ def _motion(self, event):

def on_clicked(self, func):
"""
When the button is clicked, call this *func* with event
When the button is clicked, call this *func* with event.

A connection id is returned which can be used to disconnect
A connection id is returned. It can be used to disconnect
the button from its callback.
"""
cid = self.cnt
self.observers[cid] = func
Expand All @@ -265,8 +265,8 @@ class Slider(AxesWidget):
"""
A slider representing a floating point range.

For the slider
to remain responsive you must maintain a reference to it.
For the slider to remain responsive you must maintain a
reference to it.

The following attributes are defined
*ax* : the slider :class:`matplotlib.axes.Axes` instance
Expand Down Expand Up @@ -304,10 +304,10 @@ def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
"""
Create a slider from *valmin* to *valmax* in axes *ax*.

additional kwargs are passed on to ``self.poly`` which is the
:class:`matplotlib.patches.Rectangle` which draws the slider
knob. See the :class:`matplotlib.patches.Rectangle` documentation
valid property names (e.g., *facecolor*, *edgecolor*, *alpha*, ...)
Additional kwargs are passed on to ``self.poly`` which is the
:class:`matplotlib.patches.Rectangle` that draws the slider
knob. See the :class:`matplotlib.patches.Rectangle` documentation for
valid property names (e.g., *facecolor*, *edgecolor*, *alpha*, ...).

Parameters
----------
Expand Down Expand Up @@ -476,7 +476,7 @@ class CheckButtons(AxesWidget):
"""
A GUI neutral radio button.

For the check buttons to remain responsive you much keep a
For the check buttons to remain responsive you must keep a
reference to this object.

The following attributes are exposed
Expand Down Expand Up @@ -624,12 +624,12 @@ def disconnect(self, cid):

class RadioButtons(AxesWidget):
"""
A GUI neutral radio button
A GUI neutral radio button.

For the buttons to remain responsive
you much keep a reference to this object.
you must keep a reference to this object.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well unwrap this line too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seem to have missed this one?


The following attributes are exposed
The following attributes are exposed:

*ax*
The :class:`matplotlib.axes.Axes` instance the buttons are in
Expand Down Expand Up @@ -772,16 +772,16 @@ def disconnect(self, cid):

class SubplotTool(Widget):
"""
A tool to adjust to subplot params of a :class:`matplotlib.figure.Figure`
A tool to adjust the subplot params of a :class:`matplotlib.figure.Figure`.
"""
def __init__(self, targetfig, toolfig):
"""
*targetfig*
The figure instance to adjust
The figure instance to adjust.

*toolfig*
The figure instance to embed the subplot tool into. If
None, a default figure will be created. If you are using
*None*, a default figure will be created. If you are using
this from the GUI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you fixed the other truncated comment; any ideas what goes here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess this is the one you meant in the original comment, then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly. That's what I meant.

"""
# FIXME: The docstring seems to just abruptly end without...
Expand Down Expand Up @@ -921,9 +921,9 @@ def funchspace(self, val):

class Cursor(AxesWidget):
"""
A horizontal and vertical line span the axes that and move with
the pointer. You can turn off the hline or vline spectively with
the attributes
A horizontal and vertical line that spans the axes and moves with
the pointer. You can turn off the hline or vline respectively with
the following attributes:

*horizOn*
Controls the visibility of the horizontal line
Expand All @@ -933,7 +933,7 @@ class Cursor(AxesWidget):

and the visibility of the cursor itself with the *visible* attribute.

For the cursor to remain responsive you much keep a reference to
For the cursor to remain responsive you must keep a reference to
it.
"""
def __init__(self, ax, horizOn=True, vertOn=True, useblit=False,
Expand Down Expand Up @@ -1018,7 +1018,7 @@ class MultiCursor(Widget):
Provide a vertical (default) and/or horizontal line cursor shared between
multiple axes.

For the cursor to remain responsive you much keep a reference to
For the cursor to remain responsive you must keep a reference to
it.

Example usage::
Expand Down Expand Up @@ -1366,7 +1366,7 @@ class SpanSelector(_SelectorWidget):
"""
Select a min/max range of the x or y axes for a matplotlib Axes.

For the selector to remain responsive you much keep a reference to
For the selector to remain responsive you must keep a reference to
it.

Example usage::
Expand Down Expand Up @@ -1630,7 +1630,7 @@ class RectangleSelector(_SelectorWidget):
"""
Select a rectangular region of an axes.

For the cursor to remain responsive you much keep a reference to
For the cursor to remain responsive you must keep a reference to
it.

Example usage::
Expand Down Expand Up @@ -2045,7 +2045,7 @@ class EllipseSelector(RectangleSelector):
"""
Select an elliptical region of an axes.

For the cursor to remain responsive you much keep a reference to
For the cursor to remain responsive you must keep a reference to
it.

Example usage::
Expand Down Expand Up @@ -2115,7 +2115,7 @@ def _rect_bbox(self):
class LassoSelector(_SelectorWidget):
"""Selection curve of an arbitrary shape.

For the selector to remain responsive you much keep a reference to
For the selector to remain responsive you must keep a reference to
it.

The selected path can be used in conjunction with
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.