Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ecf852

Browse files
committed
changed "self.val" to "self.value_selected"
1 parent 9a6a92c commit 6ecf852

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/widgets.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ class RadioButtons(AxesWidget):
628628
*circles*
629629
A list of :class:`matplotlib.patches.Circle` instances
630630
631-
*val*
631+
*value_selected*
632632
A string listing the current value selected
633633
634634
Connect to the RadioButtons with the :meth:`on_clicked` method
@@ -648,6 +648,7 @@ def __init__(self, ax, labels, active=0, activecolor='blue'):
648648
"""
649649
AxesWidget.__init__(self, ax)
650650
self.activecolor = activecolor
651+
self.value_selected = None
651652

652653
ax.set_xticks([])
653654
ax.set_yticks([])
@@ -665,7 +666,7 @@ def __init__(self, ax, labels, active=0, activecolor='blue'):
665666
verticalalignment='center')
666667

667668
if cnt == active:
668-
self.val = label
669+
self.value_selected = label
669670
facecolor = activecolor
670671
else:
671672
facecolor = axcolor
@@ -701,7 +702,7 @@ def inside(p):
701702
if t.get_window_extent().contains(event.x, event.y) or inside(p):
702703
inp = p
703704
thist = t
704-
self.val = t.get_text()
705+
self.value_selected = t.get_text()
705706
break
706707
else:
707708
return

0 commit comments

Comments
 (0)