Back: 3.6.2 plq and pledit Forward: 3.8 Writing new plotting functions     FastBack: 3. Graphics Up: 3. Graphics FastForward: 4. Embedding Compiled Routines Inside Yorick         Top: Yorick: An Interpreted Language Contents: Table of Contents     About: About This Document

3.7 Defaults for keywords

With the pldefault command, you can set default values for many of the keywords in the window command and the primitive plotting commands. These keywords control the line type, width, and color for the plg, plc, plm, and pldj commands, the style and dpi of newly created windows, and other properties of graphics windows and objects.

You can use pldefault interactively to set new, but temporary, default values before embarking on a series of plots. Or place a pldefault command in your ‘~/yorick/custom.i’ file if your personal preferences differ from Yorick’s defaults.

You must use the hcp_file command to set values for the dump= or ps= keywords (which determine whether to dump the palette to hardcopy files and whether automatically created hardcopy files are PostScript or binary CGM), and these settings remain in effect until you explicitly change them.

For example, if you want to use the ‘vg.gs’ style, with unmarked wide lines, and you want PostScript hardcopy files (by default) including the palette for each frame, you can put the following two lines in your ‘custom.i’ file:

 
pldefault, style="vg.gs", marks=0, width=4;
hcp_file, dump=1, ps=1;

The values you set using pldefault are true default values – you can override them on each separate call to window or a plotting primitive, but the default value remains in effect unless you reset it with a second call to pldefault. Conversely, you can’t temporarily override a dump= or ps= value you set with hcp_file – you just have to set them to a new value.


Back: 3.6.2 plq and pledit Forward: 3.8 Writing new plotting functions     FastBack: 3. Graphics Up: 3. Graphics FastForward: 4. Embedding Compiled Routines Inside Yorick         Top: Yorick: An Interpreted Language Contents: Table of Contents     About: About This Document