@@ -91,7 +91,7 @@ def ignore(self, event):
91
91
92
92
class AxesWidget (Widget ):
93
93
"""
94
- Widget that is connected to a single `~matplotlib.axes.Axes`.
94
+ Widget connected to a single `~matplotlib.axes.Axes`.
95
95
96
96
To guarantee that the widget remains responsive and not garbage-collected,
97
97
a reference to the object should be maintained by the user.
@@ -105,7 +105,7 @@ class AxesWidget(Widget):
105
105
----------
106
106
ax : `~matplotlib.axes.Axes`
107
107
The parent axes for the widget.
108
- canvas : `~matplotlib.backend_bases.FigureCanvasBase` subclass
108
+ canvas : `~matplotlib.backend_bases.FigureCanvasBase`
109
109
The parent figure canvas for the widget.
110
110
active : bool
111
111
If False, the widget does not respond to events.
@@ -158,10 +158,10 @@ def __init__(self, ax, label, image=None,
158
158
ax : `~matplotlib.axes.Axes`
159
159
The `~.axes.Axes` instance the button will be placed into.
160
160
label : str
161
- The button text. Accepts string.
162
- image : array-like or PIL image
163
- The image to place in the button, if not *None*.
164
- Supported inputs are the same as for ` .Axes.imshow`.
161
+ The button text.
162
+ image : array-like or PIL Image
163
+ The image to place in the button, if not *None*. The parameter is
164
+ directly forwarded to `~matplotlib.axes .Axes.imshow`.
165
165
color : color
166
166
The color of the button when not activated.
167
167
hovercolor : color
@@ -507,20 +507,19 @@ class CheckButtons(AxesWidget):
507
507
For the check buttons to remain responsive you must keep a
508
508
reference to this object.
509
509
510
- Connect to the CheckButtons with the :meth:` on_clicked` method
510
+ Connect to the CheckButtons with the `. on_clicked` method.
511
511
512
512
Attributes
513
513
----------
514
- ax
515
- The `matplotlib.axes.Axes` the button are located in.
516
- labels
517
- A list of `matplotlib.text.Text`\ s.
518
- lines
519
- List of (line1, line2) tuples for the x's in the check boxes.
520
- These lines exist for each box, but have ``set_visible(False)``
521
- when its box is not checked.
522
- rectangles
523
- A list of `matplotlib.patches.Rectangle`\ s.
514
+ ax : `~matplotlib.axes.Axes`
515
+ The parent axes for the widget.
516
+ labels : list of `.Text`
517
+
518
+ rectangles : list of `.Rectangle`
519
+
520
+ lines : list of (`.Line2D`, `.Line2D`) pairs
521
+ List of lines for the x's in the check boxes. These lines exist for
522
+ each box, but have ``set_visible(False)`` when its box is not checked.
524
523
"""
525
524
526
525
def __init__ (self , ax , labels , actives = None ):
@@ -602,13 +601,19 @@ def _clicked(self, event):
602
601
603
602
def set_active (self , index ):
604
603
"""
605
- Directly (de)activate a check button by index.
606
-
607
- *index* is an index into the original label list
608
- that this object was constructed with.
609
- Raises ValueError if *index* is invalid.
604
+ Toggle (activate or deactivate) a check button by index.
610
605
611
606
Callbacks will be triggered if :attr:`eventson` is True.
607
+
608
+ Parameters
609
+ ----------
610
+ index : int
611
+ Index of the check button to toggle.
612
+
613
+ Raises
614
+ ------
615
+ ValueError
616
+ If *index* is invalid.
612
617
"""
613
618
if not 0 <= index < len (self .labels ):
614
619
raise ValueError ("Invalid CheckButton index: %d" % index )
@@ -656,21 +661,21 @@ class TextBox(AxesWidget):
656
661
657
662
For the text box to remain responsive you must keep a reference to it.
658
663
659
- Call :meth:` on_text_change` to be updated whenever the text changes.
664
+ Call `. on_text_change` to be updated whenever the text changes.
660
665
661
- Call :meth:` on_submit` to be updated whenever the user hits enter or
666
+ Call `. on_submit` to be updated whenever the user hits enter or
662
667
leaves the text entry field.
663
668
664
669
Attributes
665
670
----------
666
- ax
667
- The `matplotlib. axes.Axes` the button renders into .
668
- label
669
- A `matplotlib.text.Text` instance.
670
- color
671
- The color of the button when not hovering.
672
- hovercolor
673
- The color of the button when hovering.
671
+ ax : `~matplotlib.axes.Axes`
672
+ The parent axes for the widget .
673
+ label : `.Text`
674
+
675
+ color : color
676
+ The color of the text box when not hovering.
677
+ hovercolor : color
678
+ The color of the text box when hovering.
674
679
"""
675
680
676
681
def __init__ (self , ax , label , initial = '' ,
@@ -963,18 +968,18 @@ class RadioButtons(AxesWidget):
963
968
For the buttons to remain responsive you must keep a reference to this
964
969
object.
965
970
966
- Connect to the RadioButtons with the :meth:` on_clicked` method.
971
+ Connect to the RadioButtons with the `. on_clicked` method.
967
972
968
973
Attributes
969
974
----------
970
- ax
971
- The containing `~. axes.Axes` instance .
972
- activecolor
975
+ ax : `~matplotlib.axes.Axes`
976
+ The parent axes for the widget .
977
+ activecolor : color
973
978
The color of the selected button.
974
- labels
975
- A list of `~.text.Text` instances containing the button labels.
976
- circles
977
- A list of `~.patches.Circle` instances defining the buttons.
979
+ labels : list of `.Text`
980
+ The button labels.
981
+ circles : list of `~.patches.Circle`
982
+ The buttons.
978
983
value_selected : str
979
984
The label text of the currently selected button.
980
985
"""
@@ -2501,8 +2506,7 @@ class PolygonSelector(_SelectorWidget):
2501
2506
drag anywhere in the axes to move all vertices. Press the *esc* key to
2502
2507
start a new polygon.
2503
2508
2504
- For the selector to remain responsive you must keep a reference to
2505
- it.
2509
+ For the selector to remain responsive you must keep a reference to it.
2506
2510
2507
2511
Parameters
2508
2512
----------
0 commit comments