Skip to content

Add crosshair cursor prototype example using blitting - #31310

Closed
konangisireesha3-del wants to merge 1 commit into
matplotlib:mainfrom
konangisireesha3-del:crosshair-prototype
Closed

konangisireesha3-del wants to merge 1 commit into
matplotlib:mainfrom
konangisireesha3-del:crosshair-prototype

Conversation

@konangisireesha3-del

Copy link
Copy Markdown

This PR adds a small prototype demonstrating a crosshair cursor
implemented using Matplotlib blitting for efficient redraw.

The example shows how interactive cursor overlays can be implemented
without redrawing the entire figure.

This prototype was created to explore approaches for interactive
cursor overlays and could be useful for discussions around similar
features.

@github-actions

Copy link
Copy Markdown

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@rcomer

rcomer commented Mar 15, 2026

Copy link
Copy Markdown
Member

Thank you for your interest in contributing to Matplotlib! Our existing Cursor widget already has the option to use blitting. Am I missing some context for why you created this example?

@rcomer rcomer added the status: needs clarification Issues that need more information to resolve. label Mar 15, 2026
@timhoffm

Copy link
Copy Markdown
Member

I suppose this is in the context of #30515. @konangisireesha3-del is this for exploration? We don't need this as an example in our docs.

@timhoffm
timhoffm marked this pull request as draft March 16, 2026 08:23
@melissawm melissawm moved this to Waiting for author in First Time Contributors Mar 16, 2026
@konangisireesha3-del

Copy link
Copy Markdown
Author

Hi @timhoffm and @rcomer,
Thanks for the feedback!

Yes -this PR was mainly created for exploration in the context of #30515.
My goal was not to introduce a new example for the documentation, but to better understand how efficient cursor updates can be implemented using the current blitting mechanism. In particular, I wanted to experiment with how partial redraws work in practice (via restore region and blit) and how they compare to full figure redraws.
This helped me understand the current rendering pipeline and the limitations that motivate the overlay/layered rendering discussion.
If this is not suitable as a documentation example, I’m happy to:

  • close the PR, or
  • keep it as a reference for discussion, or
  • adapt it in a way that would be more useful to the project

Please let me know what would be most appropriate.
Thanks!

@rcomer

rcomer commented Mar 18, 2026

Copy link
Copy Markdown
Member

Let's close this.

@konangisireesha3-del it's great that you are making examples for your own understanding. I think that is an excellent way to learn. However, pull requests are intended for changes you actually want to put into the library. If you want to share your examples, consider making a gist and sharing the link to that in the conversation.

@rcomer rcomer closed this Mar 18, 2026
@github-project-automation github-project-automation Bot moved this from Waiting for author to Done in First Time Contributors Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-contribution status: needs clarification Issues that need more information to resolve.

Projects

Development

Successfully merging this pull request may close these issues.

4 participants