yorick banner

Home

Manual

Packages

Global Index

Keywords

Quick Reference

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

3.3.2 Multiple graphics windows

You can have up to eight graphics windows simultaneously. Each window has its own display list, so you can build a picture in one window, switch to a second window for another plot, then return to the first window. The windows are numbered 0 through 7. The window command switches windows:

 
window, 1       // switch to window number 1
window, 0       // switch back to default window

If you switch to a window you have never used before, a new graphics window will appear on your screen. (If you do not issue an explicit window command before your first graphics command, Yorick automatically creates window number 0 for you.)

The window command takes several keywords. The wait=1 keyword pauses Yorick until the new window actually appears on your screen (if the window command creates a new window). This is important under the X window system, which cannot draw anything until a newly created window actually appears. If you write a program (such as Yorick's demo programs) which will produce graphical output, but you are not sure whether there have been any previous graphics commands, you should start with the statement:

 
window, wait=1;

The style= keyword to window specifies a particular graphics style for the window. I'll return to graphics styles later.

The dpi=100 keyword specifies a 100 dot per inch window, rather than the default 75 dot per inch window. The window you see on your screen is a replica of a portion of an 8.5 by 11 inch sheet of paper, and the dpi (either 75 or 100) refers to the number of screen pixels which will correspond to one inch on that sheet of paper if you were to tell Yorick to print the picture (see hcp). Owing to the fonts available with X11R4, Yorick permits only the two scale factors.

Initially, a Yorick window is a six inch by six inch window on the 8.5 by 11 sheet, centered at the center of the upper 8.5 by 8.5 inch square for portrait orientation, or at the center of the rectangular sheet for landscape orientation. (Portrait or landscape orientation is a function of the graphics style you choose. Six inches is 450 pixels at 75 dpi or 600 pixels at 100 dpi, so dpi=75 makes a small window, while dpi=100 makes a large window.) You can resize the window (with your window manager), but Yorick will always use either the 75 or 100 dot per inch scaling, so resizing a Yorick window is not very useful unless you want to use more than the six by six inch square that is initially visible.

The display= keyword specifies a display other than your default display. For example, if you have two screens you might use

 
window, 0
window, 1, display="zaphod:0.1"

(if zaphod is the name of the machine running your X server) in order to create window number 0 on your default screen and window number 1 on your second screen.

You will rarely need the other keywords to the window command, which allow for a private colormap (for color table animation), turn the legends off in hardcopy output, and create a private hardcopy file for the sole use of that one window. With the latter capability, you can write commands like eps that print the current picture, without affecting the main hardcopy file.


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