Skip to content

Commit 3a380e5

Browse files
committed
DOC: use figure.canvas.draw_idle rather than plt.draw
Local is better than global
1 parent 637d4d3 commit 3a380e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/widgets/check_buttons.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
def callback(label):
4040
ln = lines_by_label[label]
4141
ln.set_visible(not ln.get_visible())
42-
plt.draw()
42+
ln.figure.canvas.draw_idle()
4343

4444
check.on_clicked(callback)
4545

0 commit comments

Comments
 (0)