Skip to content

Commit 416cce7

Browse files
committed
Fix radio_buttons example for event connections only taking a weak reference.
svn path=/trunk/matplotlib/; revision=8763
1 parent e25abbe commit 416cce7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/widgets/radio_buttons.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ def hzfunc(label):
2020
radio.on_clicked(hzfunc)
2121

2222
rax = axes([0.05, 0.4, 0.15, 0.15], axisbg=axcolor)
23-
radio = RadioButtons(rax, ('red', 'blue', 'green'))
23+
radio2 = RadioButtons(rax, ('red', 'blue', 'green'))
2424
def colorfunc(label):
2525
l.set_color(label)
2626
draw()
27-
radio.on_clicked(colorfunc)
27+
radio2.on_clicked(colorfunc)
2828

2929
rax = axes([0.05, 0.1, 0.15, 0.15], axisbg=axcolor)
30-
radio = RadioButtons(rax, ('-', '--', '-.', 'steps', ':'))
30+
radio3 = RadioButtons(rax, ('-', '--', '-.', 'steps', ':'))
3131
def stylefunc(label):
3232
l.set_linestyle(label)
3333
draw()
34-
radio.on_clicked(stylefunc)
34+
radio3.on_clicked(stylefunc)
3535

3636
show()

0 commit comments

Comments
 (0)