Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
Description
Bug summary
Whenever CheckButtons are within a plot area, theuseblit=True
(in a cursor for example) produces visual errors with the buttons when the mouse is within the plot area so the cursor is active. The issue seems to be backend-agnostic (confirmed in Qt5Agg and TkAgg for now).
Code for reproduction
importmatplotlib,matplotlib.pyplotcheckbutton1=Falsecheckbutton2=Truefigure=matplotlib.pyplot.figure()matplotlib.pyplot.subplots_adjust(top=0.9)# no bug without this line or if margin large enoughax=figure.add_subplot()ax_cursor=matplotlib.widgets.Cursor(ax,useblit=True)# no bug with useblit=Falseax_settings=matplotlib.pyplot.axes([0.8,0.8,0.1,0.1])input_settings=matplotlib.widgets.CheckButtons(ax_settings, ["Set1","Set2"], [checkbutton1,checkbutton2])matplotlib.pyplot.show()
Actual outcome
Expected outcome
The check mark forSet2 is missing even thoughcheckbutton2 = True
. When the mouse leaves the area and deactivates cursor, the check mark reappears.
Additional information
No response
Operating system
GNU/Linux
Matplotlib Version
3.7.1
Matplotlib Backend
TkAgg, Qt5Agg
Python version
3.10.10
Jupyter version
no Jupyter
Installation
Linux package manager