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
Description
I'm working on adding touch-to-drag and pinch-to-zoom support for matplotlib. It is in general working but there are a few things to add before I submit a pull request. Wanted to get the conversation started though on a few points, and ask for any general input from the community.
Specific points:
- Is this a good idea (I can't think of a reason it wouldn't be, but advise)
- Should it be a toggle-able feature, for example in the rcParams? (I can't really think of a reason it should be, but maybe there is a use case in which people want touches to behave as mouse input)
- Pinch to zoom in my implementation keeps the same points on the plot under your finger. So x and y axes rescale independently and aspect ratio changes as you move the two touches. Sounds reasonable? (this is intuitive to me)
- Key input should hold x, y, aspect ratio (ctrl) as it does for current interactive mode. But maybe there should be some other situations in which we hold x,y: for example if the two touches are at approximately the same y-value, small changes in their y-location will lead to huge scale changes for the y-axis. So maybe if the touches are sufficiently close on an axis, that axis should be locked?
Open to any other ideas!