https://github.com/espdev/mpl-interact
A library encompassing smart interactions missing in matplotlib
https://github.com/espdev/mpl-interact
interaction interactions matplotlib mpl
Last synced: 2 days ago
JSON representation
A library encompassing smart interactions missing in matplotlib
- Host: GitHub
- URL: https://github.com/espdev/mpl-interact
- Owner: espdev
- License: mit
- Created: 2019-05-23T22:54:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-18T02:59:53.000Z (almost 3 years ago)
- Last Synced: 2026-07-16T09:28:45.338Z (3 days ago)
- Topics: interaction, interactions, matplotlib, mpl
- Language: Python
- Size: 42 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mpl-interact
[](https://pypi.python.org/pypi/mpl-interact)
[](https://travis-ci.org/espdev/mpl-interact)
[](https://mpl-interact.readthedocs.io/en/latest/)
[](LICENSE)
A library encompassing smart interactions missing in matplotlib
**UNDER DEVELOPMENT**
## Usage
The following code enables interactors for GCF:
* zoom by mouse wheel scrolling
* drag by mouse left button
* reset by mouse any button double click
```python
import numpy as np
from matplotlib import pyplot as plt
from mpl_interact import interact
x = np.linspace(0, 2*np.pi, 100)
ys = np.sin(x)
yc = np.cos(x)
plt.plot(x, ys, 'o-', x, yc, 'o-')
interact()
plt.show()
```