FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Bug]: Cursor blitting produces CheckButton issue (backend-agnostic) · Issue #25670 · matplotlib/matplotlib · GitHub

Repository navigation

[Bug]: Cursor blitting produces CheckButton issue (backend-agnostic) #25670

Closed

Description

Bug summary

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

import matplotlib, matplotlib.pyplot

checkbutton1 = False
checkbutton2 = True

figure = matplotlib.pyplot.figure()
matplotlib.pyplot.subplots_adjust(top=0.9) # no bug without this line or if margin large enough

ax = figure.add_subplot()
ax_cursor = matplotlib.widgets.Cursor(ax, useblit=True) # no bug with useblit=False

ax_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.

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

Activity

  1. QuLogic commented on Apr 12, 2023

    Member

    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.

  2. drws commented on Apr 21, 2023

    Author

    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.

  3. MohitPal2005 commented on Mar 23, 2026

    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL