Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Problem
Compared to other visualization frameworks, matplotlib has very limited capability for interacting with the plot. I think we could do a bit better here.
There are two obstacles related to interactivity in Matplotlib:
- By design, we have a one-way processing pipeline from data to a visual representation (pixels or vector primitives). Backtracking which data or Artist is responsible for a visual output is possible, but not quite easy. Additionally, any desired visual change requires a complete re-rendering.
- We have multiple backends and want to provide consistency. This means, we have non-interactive backends that just can't provide interactivity. The interactivity we provide should work across all interactive backends.
1 is an architecture limitation, that we cannot easily circumvent. This means, we won't be high-perfoming and won't be able to support complex interactions. 2 also limits the complexity of interactions we can practically implement. OTOH it does not mean we cannot provide any interactivity at all. For example, we do have panning and zooming in interactive backends.
Proposed solution
Let us consider which small improvements we can reasonably make to improve interactive experience. The following list should track interactivity ideas that seem prossible to implement under the current architecture with limited effort. Please feel free to add:
- Data tooltip support[ENH]: Data tooltip support #23378
- Support panning and zooming using mouse scroll wheelSupport panning and zooming using mouse scroll wheel #20317
- Toggling data via legendAdd Checkboxes to Legend Controlling Subplot Visibility #16796