https://github.com/serwy/axclf
Save/restore Matplotlib axes limits during iterative and interactive development
https://github.com/serwy/axclf
matplotlib plot
Last synced: about 2 months ago
JSON representation
Save/restore Matplotlib axes limits during iterative and interactive development
- Host: GitHub
- URL: https://github.com/serwy/axclf
- Owner: serwy
- License: bsd-2-clause
- Created: 2018-11-17T21:59:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-13T01:32:50.000Z (over 3 years ago)
- Last Synced: 2025-03-04T02:43:35.887Z (over 1 year ago)
- Topics: matplotlib, plot
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# axclf
Save/restore Matplotlib axes limits during iterative and interactive
development.
## Background
This functionality becomes useful when using cell-mode functionality
in editors such as IdleX, Spyder, IEP, etc. During algorithm prototyping,
plots are generated. These helper routines allow for inspecting a
region of interest on a plot, and then running a change to see its effects
without needing to re-zoom/pan to the region of interest.
## Example
```
from pylab import *
from axclf import *
ion()
## interactive cell
figure(1)
axclf() # save axes limits and clear figure
ex = 6 # adjust this number when re-running, (CTRL+Plus in IdleX)
x = linspace(0, 10, 1000)
y = sin(x) ** ex
plot(x, y)
axrestore() # restore axes limits
```