Whenever CheckButtons are within a plot area, the useblit=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 for Set2 is missing even though checkbutton2 = True. When the mouse leaves the area and deactivates cursor, the check mark reappears.
Thank you for the explanation and the current workaround. I couldn't find a general-purpose issue for improving blitting manager to link this, so I kindly ask anyone to mention this one where necessary.
Activity
QuLogic commented on Apr 12, 2023
This is because we don't really have a good blitting manager, and one blit overrides the other when they overlap like this.
This can also be fixed in the opposite way by setting useblit=False to CheckButtons.
drws commented on Apr 21, 2023
Thank you for the explanation and the current workaround. I couldn't find a general-purpose issue for improving blitting manager to link this, so I kindly ask anyone to mention this one where necessary.
MohitPal2005 commented on Mar 23, 2026
Hi @QuLogic and team,
I’ve been looking into this issue and was able to understand the root cause around overlapping blitting operations between Cursor and CheckButtons.
I’m planning to reproduce this locally and explore a fix to better manage background restoration when multiple dynamic artists interact.
I’ll start working on a solution and open a PR soon.
Please let me know if there are any specific considerations I should keep in mind.