Back: 3.2.1.1 Zooming with the mouse Forward: 3.2.1.3 Forcing square limits     FastBack: 3. Graphics Up: 3.2.1 limits FastForward: 4. Embedding Compiled Routines Inside Yorick         Top: Yorick: An Interpreted Language Contents: Table of Contents     About: About This Document

3.2.1.2 Saving plot limits

You can also invoke the limits command as a function, in which case it returns the current value of [xmin,xmax,ymin,ymax,flags]. The flags are bits that determine which of the limits (if any) were computed as extreme values of the data, and a few other optional features (to be mentioned momentarily). The value returned by limits as the argument to a later limits command restores the limits to a prior condition, including the settings of extreme value flags. Thus,

 
         // mouse zooms here locate an interesting feature
detail1 = limits()
unzoom   // remove effects of mouse zooms
         // mouse zooms here locate second interesting feature
detail2 = limits()
limits, detail1    // look at first feature again
limits, detail2    // look at second feature again
limits   // return to extreme values

Back: 3.2.1.1 Zooming with the mouse Forward: 3.2.1.3 Forcing square limits     FastBack: 3. Graphics Up: 3.2.1 limits FastForward: 4. Embedding Compiled Routines Inside Yorick         Top: Yorick: An Interpreted Language Contents: Table of Contents     About: About This Document