Skip to main content

save/restore plot limits

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for axclf, version 0.1.0.dev0
Filename, size File type Python version Upload date Hashes
Filename, size axclf-0.1.0.dev0.zip (4.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page