yorick banner

Home

Manual

Packages

Global Index

Keywords

Quick Reference

Back: Display list Forward: multiple windows   FastBack: Plot limits Up: Display list FastForward: Hardcopy         Top: Yorick Contents: Table of Contents Index: Concept Index About: About this document

3.3.1 fma and redraw

The fma command (mnemonic for frame advance) performs two functions: First, if the current display list has changed, Yorick re-walks it, ensuring that your screen is up to date. Afterwards, fma clears the display list.

In normal interactive use, you think of the first function -- making sure what you see on your screen matches the display list -- as a side effect. Your aim is to clear the display list so you can begin a fresh picture. However, in a Yorick program that is making a movie, the point is to draw the current frame of the movie, and clearing the display list is the side effect which prepares for the next movie frame.

Another side effect of fma is more subtle: Since Yorick no longer remembers the sequence of commands required to draw the screen, attempts to change plot limits (zoom or pan), rescale axes, or any other operation requiring a redraw will not change your screen after an fma, even though you may still see the picture on your screen.

Once set, limits are persistent across frame advances. That is, after an fma, the next plot will inherit the limits of the previous plot. I concede that this is not always desirable, but forgetting the previous limits can also be very annoying. Another possibility would be to provide a means for setting the initial limits for new plots; I judged this confusing. You get used to typing

 
fma; limits

when you know the old limits are incorrect for the new plot. The axis scaling set by logxy, and grid lines set by gridxy are also persistent across frame advances.

On rare occasions, Yorick may not update your screen properly. The redraw command erases your screen and walks the entire display list. You can also use this in Yorick programs to force the current picture to appear on your screen immediately, without the side effect of clearing the display list with fma. (Perhaps you want to start looking at a rapidly completed part of a picture while a more lengthy calculation of the rest of the picture is in progress.)

Note that redraw unconditionally walks the entire display list, while fma only walks the part that hasn't been previously walked or damaged by operations (like limits changes) that have occurred since the last walk.


Back: Display list Forward: multiple windows   FastBack: Plot limits Up: Display list FastForward: Hardcopy         Top: Yorick Contents: Table of Contents Index: Concept Index About: About this document