LAYOUT

Section: User Commands (1)
Updated:
Index
Return to Main Contents
 

NAME

layout - HPGL graphic layout editor  

SYNOPSIS

layout [ [-p] file ]
layout -u file  

DESCRIPTION

Layout allows you to maintain any number of layout files, which specify the layout of plots on a page. Normally, the HP plotter spooler (hardcopy(1)), plots only one job (one graph) per page. With layout, you can divide the page into several panels. Panels can then be filled with HPGL plot files, and the whole layout plotted on a single page. Layouts can also be used as templates for subsequent plotting by hardcopy: each subsequent plotter job submitted will then appear in its own panel; the page will be plotted and a new page will be loaded only after all panels are used.

If the file argument is given, layout simulates a Layout operation (see below) to load the named file, so that it can be edited.

If the -p option is specified, the file argument must be given. Layout will read this file, then perform the equivalent of a Plot/File operation, with the Plot/All-graphics option set (both described below), sending the HPGL code to the standard output. It then quits. The generated output can be redirected to a file, or piped to hardcopy. This allows you to quickly plot out a completed layout file, without getting into layout's editing mode.

If the -u option is specified, the file argument must be given. Layout will read this file, then perform the Use operation (also described below), then quit. This allows you to quickly specify which layout file you wish to use, without getting into layout's editing mode.

With either the -p or -u option specified, you can give the file name as simply -, and layout will read the layout file from its standard input. This allows you to pipe a layout file to be plotted or used, without requiring a temporary file.

If the -p and -u options are not specified, layout enters its editing mode, which allows you to add, delete and change panels. A layout file may contain up to 256 panels. When displayed on the screen, a number appears in the bottom-left corner of each panel. These numbers indicate the order in which the panels will be used; it is possible to change this order. An arrow also appears in each panel, indicating the orientation of the graph which will be plotted in this panel. At the bottom of the display, layout prints the following menu prompt line:

Add Change Delete Empty Fill Invert Layout Number Plot Quit Rotate Set-page Text Use View Write

An operation is initiated by typing a single letter, the first letter of an item in the menu line. You can also step through the menu using the space bar and the backspace (or erase) key, to highlight the item you want, then press RETURN to select that item.  

Add

This selection allows you to add a series of panels. Panels are added at the end of the sequence, and the new panel number is displayed at the top of the screen. Select the desired area of the page by using the pointing device to move the cursor to the desired position for the bottom-left or top-right corner of the panel, then pressing either button A to set the panel origin (usually the bottom-left corner) to the position of the cursor, or button B to set the opposite (top-right) corner. You can hold down either button to drag the corresponding corner around to the location you want, or just press to place the corner where the cursor is. You may reposition either corner, until the panel looks right. When moving the panel origin, the opposite corner is moved as well, to maintain the size of the panel. Setting the opposite corner alone allows the panel to be resized.

Fine adjustments may be made to the position of the last corner selected (or of the origin, initially) by using the keys "^", "v", "<", or ">" for up, down, left, or right movement in single grid increments (see below), respectively. The arrow keys on the editing keypad of the terminal may be used as well. The last position adjustment can be undone by using the U key.

You can also set both corners of the panel to be identical to those of another existing panel, by using the # key. You will then be prompted for a panel number. Entering a valid panel number causes the current panel's corners to be set to those of the specified panel. You could then use button A to move the panel to a different position, keeping the size constant.

As you adjust the position of either corner, the top status line is updated to indicate the new position of each corner, either in millimetres or as a percentage of the usable page size. Typing the % key will toggle the status display between these two units of measure.

Initially, panel bounds may be adjusted in increments of one plotter unit, or one 40th of a millimetre. Typing the + key allows you to set up a "grid" of a lower resolution, to facilitate alignment of panels to a particular spacing, by specifying the grid spacing in millimetres. Subsequent adjustments of the panel bounds will be aligned to an invisible grid of the given spacing. Specifying a grid spacing of less than 0.025, such as 0, will reset the grid spacing to 0.025 millimetres, i.e. plotter units. Larger grid spacings are rounded to the nearest multiple of 0.025.

Press button C or D when you are done, to go on to the next panel. To stop adding panels, and return to the main menu, press button C or D again, before setting either of the corners. This operation also will terminate once all 256 panels are created.  

Change

This selection allows you to change the size or location of any panel. If there is more than one panel, you are prompted to enter the number of the panel you wish to change; type in the panel number, then hit RETURN. You then set the bottom-left and top-right corners, as for the Add operation above. Press button D once when you are done, to return to the main menu.

Another way of initiating a change operation is to point to a panel with the pointing device, and click one of its first two buttons. (This can only be done when the display is in the "panel view" mode, and the program is waiting for you to make a menu selection.) You then set the bottom-left and top-right corners, as for the Add operation above. Press button D once when you are done, to return to the menu.  

Delete

This selection allows you to delete any panel. You are prompted to enter the number of the panel you wish to delete. Once this panel is deleted, all panels after this one are shifted down in the sequence; i.e. they are renumbered.  

Empty

This selection allows you to empty a panel, i.e. to remove any graph that is attached to the panel. You are prompted for the number of the panel to be emptied. Type in the panel number, then hit RETURN. The file name attached to the specified panel will be removed. Note that the file itself is not removed, and can be re-attached to a panel with the Fill operation.

The Empty operation does not delete labels that were added by the Text/Add, Text/Copy or Text/Grab-text operations, if any exist in the panel. These labels are independent of the plot file attached to the panel, and can be removed using the Text/Delete operation.  

Fill

This selection allows you to fill a panel, i.e. to attach a graph (stored in a plot file) to the panel. If there are no panels, one is created for you, which will occupy the entire usable area of the page. If there is more than one panel, you are prompted for the number of the panel to be filled; type in the panel number, then hit RETURN. Your are then prompted for the name of a plot file to attach to the panel. If the specified file exists and is readable, it will be attached to the specified panel. This is indicated on the display by showing the file name next to the panel number. See the section HPGL FILES below for a description of valid plot file format.

Note that the plot file is not loaded into the current layout; the name of the file is simply stored for future access. Thus the plot file should not be renamed, moved, or removed without making the corresponding change to any panel that refers to the file.  

Invert

This selection allows you to flip around all of the panels in your current layout. You are presented with a secondary menu, that allows you to select X-flip, Y-flip, or Both, to flip around all of the panels in the X direction, in the Y direction, or in both directions. Inverting panels is most useful when switching from a small page size to a large one, or vice-versa, since the plotter performs rotation differently for the two page sizes.  

Layout

This selection allows you to choose a new layout file to edit. If you have made any changes to the layout now displayed, and you did not yet write it out to a file, you will be asked whether you want to do so now. You should respond by typing the single letter Y, meaning yes, or N, meaning no. If you respond with Y, the Write operation will be performed (see below). This will be repeated until either the file is successfully written, or an N is typed in response to the question.

You are prompted to enter the name of the layout file to be edited. Type in the name, then hit RETURN. If the file is a valid layout file, its panels will be displayed. If you specify the name of a file that does not exist yet, the top line of the display will indicate that this is a new file, and you will start with a clear page of a default size, usually A-size, just as you do when you invoke layout without a file argument.  

Number

This selection allows you to renumber any panel. You are prompted to enter the number of the panel you wish to renumber. Type in the panel number, then hit RETURN. You are then prompted to enter the new panel number. The chosen panel is removed from the sequence, and reinserted at its new position. All panels between these two positions are shifted accordingly. For example, if panel 2 is moved to 4, then panel 3 is moved to 2, and panel 4 is moved to 3.
 

Plot

This selection brings you to the plotting subsystem, which presents you with a secondary menu. See PLOTTING below.  

Quit

This selection, from the main menu, allows you to exit the program. It first asks you for confirmation. If you choose No, you will return to the main menu. If you choose Yes, the program will terminate. If you have made any changes to the layout now displayed, and you did not yet write it out to a file, you will be asked whether you want to do so now. You should respond by typing the single letter Y, meaning yes, or N, meaning no. If you respond with Y, the Write operation will be performed (see below). This will be repeated until either the file is successfully written, or an N is typed in response to the question.  

Rotate

This selection allows you to change the orientation of any panel. Two orientations are allowed: top edge up (no rotation), or top edge right (90 degree clockwise rotation). If there are no panels, one is created for you, which will occupy the entire usable area of the page. If there is more than one panel, you are prompted to enter the number of the panel you wish to rotate; type in the panel number, then hit RETURN. The orientation of this panel will then toggle from one orientation to the other, and the arrow displayed in the panel will change direction to indicate the new location of the top edge.

When plotting on large sheets of paper, the HP 7550A plotter rotates in the counter-clockwise direction, rather than clockwise. Use the Set-page operation to tell the layout program which page size you are using; rotated panels will then appear top edge left for large sheets.  

Set-page

This selection allows you to specify different values for the HP plotter's P1 and P2, based on page size. The initial default values for these correspond to those for A-size paper (8.5 x 11), or for the paper size specified by the HPGLPAGE environment variable. If you use a different size of paper, the HP plotter's default P1 and P2 will change accordingly. You must then specify these new values in the layout file, so that the panel coordinates are rescaled for this new page size. You are presented with the following secondary menu:

1->A-size 2->B-size 3->A3-size 4->A4-size Margins P1-P2 Quit Resize

The first four selections set P1 and P2 to the plotter's defaults for that size of paper. The panels will be rescaled to fit within these bounds, and the panels will be redisplayed.

The P1-P2 selection allows you to specify values for the HP plotter's P1 and P2 different than those available for standard page sizes. You are prompted to enter, one at a time, the P1 X and Y coordinates, then the P2 X and Y coordinates. If, for any of these, you just hit RETURN without entering a number, the current value (shown after the cursor in the prompt) will be used. Typing a control-D will cause this operation to terminate, without changing anything. Once all four numbers have been entered, the panels will be rescaled to fit within the new P1 and P2.

The Margins selection allows you to enable or disable the "margin restriction" option. When this option is enabled, as it is initially, the setting of panel bounds (by means of the Add or Change operations above) is restricted to the area defined by the current P1 and P2 values. If you try to set a panel corner outside of these margins, it will be set to the nearest margin. By disabling this option, panels bounds can be set freely outside of the margins, or even outside of the hard-clip limits. When this option is changed, the screen is redrawn: when disabled, the page is reduced on screen to allow panel bounds to be set outside of the hard-clip limits; when enabled, the page is expanded to fill the drawing area on screen.

The Resize selection allows you to resize all panels simultaneously (as is done automatically whenever you change P1 and P2), but without changing the current P1 and P2. When this operation is selected, a temporary panel is created, with its bounds set to the current P1 and P2. You are then allowed to move or resize this panel, as for the Change operation above. Once you finish changing this panel, by pressing button D, all other panels will be resized and moved proportionally, and the temporary panel will be deleted. The panels will then be redisplayed.

The Quit selection returns you to the main menu, without changing P1 and P2.  

Text

This selection allows you to add and edit text labels in a panel. If there are no panels, one is created for you, which will occupy the entire usable area of the page. If there is more than one panel, you are prompted for the number of the panel to be edited; type in the panel number, then hit RETURN. The graph and labels for the panel are displayed on the screen, and you are given a secondary menu. See TEXT LABELING below, for a description of the text labeling sub-system.

Note that if the Plot/All-graphics option is not currently set, a subsequent Plot/File or Plot/Plotter operation will produce a plot of this panel, rather than all panels, unless you perform another View/Graphics, View/Panels or View/Both operation, or set the Plot/All-graphics option, before plotting.  

Use

This selection causes the current layout to be used for subsequent plotting by the plotter spooler. The layout must contain at least one panel, and all panels must be completely empty (i.e. no plot files attached, and no graphics nor text labels added).

A file is created, which controls the operation of the spooler. Once hardcopy(1) has been called enough times to use up all panels in the layout, this control file will be automatically removed, and hardcopy will revert to its normal mode of operation. If you want to reuse the same layout again, or use any other layout, this operation will have to be repeated. (Or you will have to invoke layout with the -u option.)

If this control file already exists at the time this operation is selected, you will be asked if it is OK to replace it. Type a Y to replace the control file, or an N to abort this operation, leaving the control file unchanged. One control file is permitted for each user-tty combination.

This operation exists for reverse compatibility with earlier versions of layout and may not be supported in future versions.  

View

This selection allows you to specify what is to be displayed on screen. You are presented with a secondary menu, that allows you to select Panels, Graphics or Both. Panels are normally displayed on screen, and the display will also revert to "panel view" whenever panels are to be added or changed in any way. Selecting Graphics allows you to preview on screen what the completed layout will look like, with the graphics attached to filled panels. Selecting Both will cause both the graphics and the panel outlines to be displayed.

The graphics are drawn on screen by emulating the HPGL stored in the attached plot files. Only a small subset of the full HPGL is emulated, which is adequate for handing output from programs like analysis(1). Text is drawn as a series of line segments, using the "roman" Hershey font by default. The font can be changed by setting the environment variable VFONT to the name of any of the variable size fonts in the directory /usr/neuro/lib/font. Pen selections affect drawing colour, according to the environment variable SCRPENS, a comma-separated list of CNS names corresponding to each pen's colour.

Because of the limitations of the on-screen emulation, a valid plot file may look incomplete or incorrect on screen; however, the completed layout should be correct when plotted on a true HPGL device.

Note that the currently displayed view also affects a subsequent Plot/File or Plot/Plotter operation, if the Plot/All-graphics option is not currently set.  

Write

This selection allows you to write out the displayed panel layout to a file. You are first prompted for a file name. If you have not yet specified a file name, you will have to now. Otherwise, the name of the file you are editing will appear in the prompt, after the cursor. This file name will be used if you simply hit RETURN without typing a file name.

The information is then written out to the file, which will be created if it does not exist. If there are any errors in accessing the file or writing out the data, a message will be printed.  

!command

Whenever the menu line has just been printed, instead of typing a letter to select a menu item, you can type an exclamation point, followed by any UNIX command, then hit RETURN. A UNIX shell is invoked to interpret and execute this command. You can recall and edit the last command entered, by hitting the "up arrow" key, or Control-K, after typing the exclamation point.  

$ or %

Whenever the menu line has just been printed, you can also type either a dollar sign ($), to invoke an interactive Bourne shell, or a percent sign (%), to invoke an interactive C shell. In either case, the shell will continue accepting commands until you type a Control-D, to exit from the shell, and return to layout.  

? or /

Whenever the menu line has just been printed, you can also type either a question mark (?), or slash (/), to get a short description of all choices available in the current menu.  

TEXT LABELING

The Text selection is used to display a single panel on screen, and edit the panel's text labels. The panel's labels are stored as part of the layout file, and are independent of the HPGL plot file attached to the panel. The layout program never directly modifies the attached plot files.

There are two approaches you can take to edit the labels for a panel. You can begin with an HPGL plot file that contains only graphics, and no text labels. You can then add labels, one at a time, and place them at the desired locations over the displayed graph. For simple graphs that don't require many labels, this is quite acceptable and fairly simple.

The other approach is preferable when you want to modify a graph with several labels, or when you only want to make simple changes to the labels of a graph. You can begin with a plot file that contains both graphics and text labels. You then perform a Grab-text operation on the panel, as described below. This copies the labels from the HPGL plot file into the current panel of the layout file, so that you can edit them, resize them, and so on. It also sets the "ignore text" option for this panel, so that the old labels, which are still in the HPGL plot file, will not be displayed or plotted.

A new menu is presented, allowing you to add and change labels, and modify various label parameters. The choices are:

Add Copy Delete Edit Font Grab-text Ignore Line Move Origin Pen Quit Rotate Size View

Selections are made by typing the first letter of an item in this menu.

Many of these operations require that you first select one or more labels to be modified, before you select the operation from the menu. You can do this, while at the menu, by pointing to individual labels with the pointing device, and clicking one of its buttons. Clicking button A will unselect all other labels, and select only the one to which you are pointing. Clicking button B will select the label to which you are pointing, if not already selected, or unselect it otherwise. When labels are selected, boxes appear around their text, and a small diamond-shaped marker indicates the origin of each selected label. Clicking both buttons A and B, simultaneously, will select all labels in the panel. Clicking button A, when you are not pointing to any label, will unselect all labels.

When labels overlap, even partially, the label selected by pointing and clicking may not be the one you want. Layout always selects the most recently created label when the cursor points to more than one label. (You can consider this label to be in "front" of the others.) The "front to back" order of labels can be changed by using button C, to move all currently selected labels to the "back" and unselect them, before selecting a new label from the front. If there are no labels currently selected, button C is equivalent to button A.

You can also hold down one of these buttons, and drag the pointing device along. An expanding box will appear, from the point where you started, up to the current cursor position. When you release the button, all labels surrounded by the box will be selected. If you started by holding down button A, only these labels are selected; any others are unselected. If you started by holding down button B, these labels are selected in addition to any others already selected. Button C is equivalent to button A, except that previously selected labels are moved to the back before being unselected.  

Add

This selection allows you to add a new label to the panel. Any selected labels are unselected. You are then prompted for the text string to be added. Enter the line of text you want, and hit RETURN. The new label is placed at the center of the panel, and a Move operation is automatically initiated, to allow you to place the label where you want it.  

Copy

This selection allows you to copy an existing label, or group of labels, to a new location in the panel. The selected labels are unselected, and copied to the center of the panel. The new labels are then selected, and a Move operation is automatically initiated, to allow you to place the labels where you want them.  

Delete

This selection allows you to remove unwanted labels from the panel. Any number of labels can be selected for this operation. To help prevent unfortunate accidents, you will be asked for confirmation before the label or labels are removed. Enter a Y to allow deletion to proceed.

Deleted labels are placed into a temporary buffer, called the paste buffer. Only labels deleted by the last Delete operation are kept in the paste buffer; previous deletions are then lost. The Undelete operation, below, allows you to retrieve the current contents of the paste buffer.  

Edit

This selection allows you to change the text string of existing labels in the panel. You are prompted for the text string to replace that of the selected labels. If all selected labels have the same text, this will be shown as the default in the prompt. Enter the line of text you want, and hit RETURN. All selected labels will then be changed to the new text. If you just hit RETURN, without entering anything else, the old text will not be changed.  

Font

This selection allows you to change various font-related parameters for the selected labels. You are given a menu of these parameters. Selecting Quit will bring you back to the Text menu. The other selections will prompt you for a new value for the chosen parameter. If all selected labels currently have the same value for this parameter, this value will appear as the default value in the prompt. If you just hit RETURN, without entering anything, the labels are not modified. If you enter a new value, this new value is applied to all selected labels.

If you select one of these parameters from the menu, and have not selected any labels in the panel, you are prompted for a new default value for the parameter, to be used by the next Add operation.

The Alternate selection allows you to set the "alternate character set number" for the labels. This is not needed unless the label contains SI and SO characters to change character sets. (Alternate character sets are supported by the HP plotters, but not by the HPGL emulator.)

The Chord selection allows you to set the "chord angle" used to draw curved characters in the HP 7550A plotter's built-in proportionally-spaced characters sets.

The Direction selection allows you to set the label direction in degrees. A direction of 0 is the normal left-to-right direction. Note that the label direction can also be changed, in 90 degree increments, using the Text/Rotate selection.

The Initial selection allows you to specify whether labels should begin with the alternate character set, rather than the standard one. This option is usually not needed, and should normally be left disabled.

The Name selection allows you to select the name of a Hershey font to be used to draw out the text of the labels. If you select one of these Hershey fonts, it will be used both on-screen and on the plotter, to display characters as a series of line segments. If you enter a hyphen (-) instead, the default font is used. The default font is the built-in font for the plotter, or the default Hershey font (as described for the View/Graphics operation above) for on-screen emulation. When selecting a Hershey font, it is a good idea to also set the "standard character set number," described below, to 10, to select proportional spacing.

If the Hershey font name is preceded by a plus sign (+), the character spacing, height, and width will be optimised for horizontal and vertical centering of the character; this can be useful when labels are used as marker characters on a graph. If the font name is preceded by an asterisk (*), the text will be thickened - plotted several times, offset slightly each time both horizontally and vertically - to get more solid characters than usual. This is useful when using the multiple stroke character fonts, in large sizes, since it will fill in the gaps. Note that it also will greatly increase plotting time, as the label size increases (a doubling of label width will quadruple the number of times the label is plotted).

Font files can be in either binary or text format. If a binary version of a particular font exists, it is loaded; otherwise, the text version is loaded and converted to binary. The size, in binary format, is currently limited to 20K per font. The Hershey fonts currently available are:

compgr  complex Greek
compit  complex italic
compro  complex roman
compsc  complex script
cyrillic        complex Cyrillic
duplex  duplex roman
gothen  Gothic English
gothgr  Gothic German
gothit  Gothic Italian
greek   simplex Greek
roman   simplex roman
script  simplex script
special special characters (symbols)
special2        more special characters
symbol  other symbols
triplit triplex italic
triplro triplex roman

For all the fonts above, except for compgr, cyrillic, greek, special, special2, and symbol, the character set roughly corresponds to standard ASCII. There are also versions of these fonts corresponding to the HP Roman 8 character set, and the ISO 8 bit set with the Latin 1 extensions. These can be specified by adding the suffixes -r8 and -i8 for Roman 8 and ISO 8, respectively, to one of the above font names. For example, roman-i8 specifies the simplex roman font with the ISO Latin 1 extensions. There is also one Katakana font, roman-kt, which follows the JISX0201 (1976) Katakana encoding; it contains simplex roman characters in the bottom half (ASCII-encoded), and simplex Katakana symbols in the upper half.

The Oblique selection allows you to set the slant angle for labels. Positive values give a forward slant, and negatives give a backward slant.

The Standard selection allows you to set the "standard character set number" for the labels. The two most commonly used values for this are 0, to get the standard ASCII fixed-spaced character set, or 10, to get the standard ASCII proportionally-spaced character set (on the HP 7550A). Other sets can be used on the plotter, but when Hershey fonts are used, only one character set exists for each font file, and this parameter simply determines whether spacing will be fixed or proportional.  

Grab-text

This selection allows you to extract the text labels from the panel's attached HPGL plot file. The attached plot file must contain text labels, as well as any graphics. This operation copies the labels from the HPGL plot file into the current panel of the layout file, so that you can edit them, resize them, and so on. It also sets the "ignore text" option for this panel, so that the old labels, which are still in the HPGL plot file, will not be displayed or plotted.

When the "ignore text" option is set, you can't perform another Grab-text operation on the panel. This is to prevent accidental extraction of labels, once you have already done so. You can circumvent this by temporarily disabling this option, then repeating the operation, but you should first delete all labels that would get in the way.  

Ignore

This selection allows you to enable or disable the "ignore text" option for this panel. If enabled, the program will ignore all text labels in the attached plot file when plotting or displaying this panel. If disabled, the plot file is plotted or displayed in its entirety. Initially, this option is disabled, but is automatically enabled by the Grab-text operation. When you change this option, the panel is redisplayed accordingly.  

Line

This selection allows you to add and modify line segments and boxes in the current panel. A new menu is presented. See LINE DRAWING below, for a description of the line drawing sub-system.  

Move

This selection allows you to reposition selected labels anywhere in the panel, using the pointing device. If only one label is selected, you use the cursor to reposition the origin of that label. If more than one label is selected, a box is drawn around all of the selected labels, and you use the cursor to reposition the bottom left corner of that box; the labels are then displaced in the same direction, and by the same amount, as the box was.

In either case, when you press button A, the box that surrounds the label or labels is moved to the current cursor position. As long as the button is held down, you can drag this box around on the display. When you release the button, the label or labels move to the new position of the box. Pressing button B has a similar effect, but the box is moved from its current position only in the X direction or only in the Y direction, whichever displacement of the cursor is larger.

Fine adjustments may be made to the position of selected labels by using the keys "^", "v", "<", or ">" for up, down, left, or right movement in single grid increments (see below), respectively. The arrow keys on the editing keypad of the terminal may be used as well. You can undo the last change in position, while in the Move operation, by typing the U key.

As you move labels, or drag the box around, the top status line is updated to indicate the new position of the label origin, either in millimetres or as a percentage of the panel size. Typing the % key, while in the Move operation, will toggle the status display between these two units of measure.

Initially, label positions may be adjusted in increments of one plotter unit, or one 40th of a millimetre. Typing the + key allows you to set up a "grid" of a lower resolution, to facilitate alignment of labels to a particular spacing, by specifying the grid spacing in millimetres. Subsequent adjustments of the label origin will be aligned to an invisible grid of the given spacing. Specifying a grid spacing of less than 0.025, such as 0, will reset the grid spacing to 0.025 millimetres, i.e. plotter units.

Press button C or D when you are done, to return to the Text menu.  

Origin

This selection allows you to change the way labels are aligned with respect to their origins. You are given a menu of alignment types. Selecting Quit will bring you back to the Text menu. The other selections will change the alignment of the selected labels. The alignment selections indicate where the label origin appears, with respect to the label text, but it is the text's position that will change when you make a selection, not the label's origin. For instance, if you select Top alignment for a label, the label text is moved down, so that its origin marker appears above it; the origin marker remains fixed in its position.

The Left, Centered and Right selections change the horizontal alignment of selected labels about their origins. The Bottom, Mid-height and Top selections change the vertical alignment of selected labels about their origins. The Outside selection will move the label text away from its origin, by some small amount. Inside selection will move the label text right back beside the origin. These last two selections have no visible effect on centered, mid-height labels.

The Number selection will prompt you for the label origin code used by the LO instruction in HPGL (for the HP 7550A). The current setting for this parameter appears as the default value in the prompt, as long as all selected labels have the same current value. If you enter a new value, this value is applied to all selected labels.

The Float and Hold selections will modify the way the program changes the label origin when using the above selections. By default, the label will float around a fixed origin marker, as described above. If you ask the program to hold the label, then the text will remain in place as the origin marker moves around the label. This is useful for graphs imported from other software packages, which don't set the label origins: you can hold a label, or several, in position then set the origin as desired, so that any later change in label size will make the text grow or shrink in the direction you want.

If you have not selected any labels in the panel, any of the label origin operations above will change the default label alignment for the next Add operation.  

Pen

This selection allows you to change the pen number used to plot out the selected labels. It will prompt you for the pen number, and show you the current setting if it's the same for all selected labels. If you enter a new value, this value is applied to all selected labels. Setting the pen number to 0 suppresses display and plotting of selected labels, without actually deleting them.

If you have not selected any labels in the panel, this operation will change the default pen number for the next Add operation.  

Quit

This selection returns you to the main menu.  

Rotate

This selection allows you to rotate the selected labels around their origins. When invoked, the labels are rotated 90 degrees, counter-clockwise. It can be repeated any number of times, to obtain the desired rotation. It has no effect if no labels are selected.  

Size

This selection allows you to change various size-related parameters for the selected labels. You are given a menu of these parameters. Selecting Quit will bring you back to the Text menu. The other selections will prompt you for a new value for the chosen parameter. If all selected labels currently have the same value for this parameter, this value will appear as the default value in the prompt. If you just hit RETURN, without entering anything, the labels are not modified. If you enter a new value, this new value is applied to all selected labels.

If you select one of these parameters from the menu, and have not selected any labels in the panel, you are prompted for a new default value for the parameter, to be used by the next Add operation.

The Height selection allows you to set the character height for the labels. It corresponds approximately to the height of capital letters. The Width selection allows you to set the character width for the labels. It corresponds approximately to the width of the capital letter X. These parameters are entered in millimetres, but are maintained as factors of the panel's height and width. If you change the size of the panel, or select a different page size, the character height and width are adjusted accordingly, to keep the same text proportions in the panel. For the Hershey fonts, best results are obtained when the width is 5/7ths of the height.

The Spacing selection allows you to set the extra spacing factor for the labels. This is entered as a factor, usually less than 1, which determines the extra spacing to insert between characters. (The actual amount of space will be this factor times 150% of the label's character width.) A small negative factor will tighten up the spacing, rather than increasing it.  

Undelete

This selection allows you to retrieve deleted labels, stored in the paste buffer, and copy them to a new location in the panel. The current contents of the paste buffer are copied, and pasted into the current panel. If these labels are being undeleted for the first time, they are placed back where they were before being deleted; otherwise, they are placed in the center of the panel. In either case, the new labels are then selected, and a Move operation is automatically initiated, to allow you to place the labels where you want them.

You can use this operation to paste labels into the current panel, that had been deleted from another panel. If the two panels have different sizes, or different proportions, the labels will keep the same actual size as they had in the other panel, rather than the same proportions relative to the panel sizes. However, the placement of labels will be maintained relative to the panel dimensions. This may pose a problem with alignment of labels when you paste several labels in a panel of a different size.  

View

This selection redisplays the graph and labels of the current panel. It can be used any time the screen has been cleared or garbled, to allow you to continue selecting labels and modifying them.

As labels are moved around on the display, they can overlap with and erase parts of the graph or parts of other labels. Also, if they overlap with the selection boxes or origin markers of other labels, they can cause parts of these boxes or markers to remain on the display after they are erased. A View operation will clean this up by redrawing everything.  

LINE DRAWING

The Text/Line selection is used to add and modify line segments and boxes in the current panel. A new menu is presented, allowing you the following choices:

Align-labels Box-draw Draw-line Invert Quit Select Type Unselect

Selections are made by typing the first letter of an item in this menu.

Line segments and boxes added by the Box-draw and Draw-line operations below are treated much like text labels. The Copy, Delete, Font/Direction, Move, Pen, Rotate, Size, and Undelete operations described above can all be applied to these graphics.  

Align-labels

This selection allows you to align each selected text label, line segment, and box to a particular grid spacing. You are prompted for a grid spacing value, in millimetres. The origin of each selected label will then be aligned to the nearest increment for the given grid spacing. The specified grid remains in effect for any labels subsequently created or moved.  

Box-draw

This selection allows you to draw one or more rectangular box outlines. Point the cursor to the position where one corner of the box (the origin) is to be drawn, then press and hold button A of the pointing device as you move the cursor to the position of the opposite corner. A box will be dragged along, following the cursor, as long as the button is pressed. Release the button to fix the opposite corner of the box at the current position. The box will be drawn using the default line type and pen number. Holding button B while dragging the box will accomplish the same thing, except that the resulting box will be a square, rather than an arbitrary rectangle.

Additional boxes may now be drawn by again pressing a button and dragging the cursor. Beginning a new box by pressing button B will cause the origin of the new box to be set to the position of the opposite corner of the last box, rather than the cursor position. When you are finished drawing boxes, pressing button D will return you to the menu. Pressing the % and + keys accomplishes the same thing as in the Change and Text/Move operations.  

Draw-line

This selection allows you to draw one or more line segments. Point the cursor to the position where one end of the line segment (the origin) is to be drawn, then press and hold button A of the pointing device as you move the cursor to the position of the opposite end. A line will be dragged along, following the cursor, as long as the button is pressed. Release the button to fix the opposite end of the line segment at the current position. The line segment will be drawn using the default line type and pen number. Holding button B while dragging the line will accomplish the same thing, except that the resulting line segment will be either horizontal or vertical, depending on the direction of displacement from the origin, rather than at an arbitrary angle.

Additional line segments may now be drawn by again pressing a button and dragging the cursor. Beginning a new line segment by pressing button B will cause the origin of the new line segment to be set to the position of the end point of the last line segment, rather than the cursor position. When you are finished drawing boxes, pressing button D will return you to the menu. Pressing the % and + keys accomplishes the same thing as in the Change and Text/Move operations.  

Invert

This selection allows you to invert the selected lines, boxes, and text labels along either the X or Y axes, or both. A menu is presented, indicating the allowed choices. Selecting Quit returns you to the previous menu, without any changes.

Selecting X-flip inverts the X coordinate of all selected labels, resulting in a "mirror-image" flip along a centered vertical axis. Selecting Y-flip inverts the Y coordinate of all selected labels, resulting in a "mirror-image" flip along a centered horizontal axis. Selecting Both inverts both the X and Y coordinates, resulting in upside-down labels.  

Quit

This selection returns you to the Text menu.  

Select

This selection allows you to quickly select all labels, or groups of labels based on their type, rather than their position. A menu is presented, indicating the allowed choices. Selecting Quit returns you to the previous menu, without any changes.

Selecting All results in all boxes, lines, and text labels being selected. Boxes will select all boxes in the panel. Lines will do likewise for all line segments. Graphics will select all boxes and all line segments. Text will select all text labels in the panel.  

Type

This selection allows you to set or change the line type of selected box outlines and line segments. A menu is presented, indicating the allowed choices. Selecting Quit returns you to the previous menu, without any changes.

Selecting a digit in the range 0 to 6 will set the line type to solid, dotted, dashed, long-dashed, dashed/dotted, long/short-dashed, or long/short/short-dashed, respectively. Selecting Edit will result in a prompt allowing you to set or change the line type specification, used by the HPGL LT instruction, for the selected lines and boxes. If only one graphic is selected, or if they all have the same line type, the prompt will show the current line type as the default.  

Unselect

This selection allows you to quickly unselect all labels, or groups of labels based on their type, rather than their position. A menu is presented, indicating the allowed choices. The menu is the same as for Select above, except that each choice results in the applicable labels being unselected.  

PLOTTING

The Plot selection is used to produce a plot similar to what is displayed on the screen. A new menu is presented, allowing you to change certain plotting parameters. The choices are:

All-graphics File Plotter Quit Screen Text Video

Selections are made by typing the first letter of an item in this menu.  

All-graphics

This selection allows you to change the "plot all graphics" option. If this option is disabled, the generated plot will be equivalent to the current "view" on the screen. If enabled, as is the case initially, the generated plot will be the complete layout with all graphics included, equivalent to the view generated by View/Graphics, regardless of the current view on the screen. This is useful when the layout is complex, and would take too long to view on screen before plotting it.  

File

This selection allows you to store the HPGL commands used to plot the graph in a file. You will then be able to plot this graph, at a later time, by invoking hardcopy(1). You will be prompted to enter the file name. If you enter a file name, the graph will be stored in this file. If the file already existed, it will be overwritten.  

Plotter

This selection allows you to plot the graph directly to the plotter. The hardcopy program is invoked to plot the displayed graph. Before beginning this operation, make sure the plotter is powered up, on-line, and that a clean sheet of paper has been loaded. Also make sure the plotter's autoload option is enabled.

When plotting, whether to a file or to the plotter, layout will plot each panel in order of panel number. For a given panel, it will first plot out the content of the attached plot file. This is followed by all line segments, boxes, and text labels using the plotter's built-in font, in order of pen number. Finally, text labels using Hershey fonts are plotted, also in order of pen number.  

Quit

This selection returns you to the previously displayed menu.  

Screen

This selection allows you to change the screen redraw option. If this option is enabled, the graph will be redrawn on the screen while it is being sent to the file or the spooler. If disabled, the current contents of the screen will remain, while the plot is generated. (This option affects only the "panel view;" the screen is not redrawn when plotting the "graphics view.")  

Text

This selection allows you to change the plot text option. If this option is disabled, the generated plot will not contain any text; all titles and labels will be stripped from it, leaving only the axes, tick marks, data points, etc. This is useful when the plot is reduced in size to the point where the text would be illegible. If enabled, the generated graph will be complete with all titles and labels.  

Video

This selection does not affect the pen plotter, but instead produces a printed copy of the video display's current contents - a screen dump - by invoking sdump(1). The same thing can be accomplished by pressing the quit key, normally Control-B. The Plot/Video operation has the advantage that it can be used even when the program is reading its commands from a file, rather than the terminal. Also, the Plot/Video operation clears the menu area before performing the screen dump.  

HPGL FILES

If a plot file is to be plotted in a panel, either by attaching it with a Fill operation, or by spooling it with hardcopy after a Use operation, it must adhere to the following constraints. The plot must be scalable, i.e. the file must contain an SC instruction, to set up user-unit scaling for all coordinates. It must also avoid instructions that require the specification of absolute units (e.g. centimetres or plotter units), such as SI and IW instructions. All output instructions (such as OA, OI, OP, etc.), digitiser instructions (DC, DP, OD), page feed instructions (PG, AF, AH), the not-ready instruction (NR), and device-control instructions (escape sequences) must be avoided. Finally, the initialisation and setup instructions, IN, DF, RO, and IP, which are used by layout to set up a panel for a plot file, must be avoided, as they would override the panel setup (and cause the plot to "spill out" of its panel).

Because of this last constraint, completed layouts that are saved as plot files, by selecting Plot/File above, can not then be plotted within a panel of a subsequent layout.

In order to perform a Text/Grab-text operation on a panel, the attached plot file must contain label instructions (LB, or BL and PB). Without these, layout will not be able to extract the label text from the file.  

X WINDOW SUPPORT

When the X Window version of this program is run on an X Window terminal, a new window will be shown for displaying program output. Unless the input was redirected from a file, it will be taken from the keyboard when this window is the "input focus", i.e. the active window. When running this way, it is essentially detached from the xterm window from which you run the command, and it can be run in the background.

As for most other X Window programs in this package, the following X command line options are accepted:

-cursor num
You can specify any cursor number (not cursor names) in the Standard Cursor Symbols described in the X Window System User's Guide using the -cursor or -curs option. The default value is 68, the left pointer symbol. This can also be specified using the CURSOR environment variable.
-display [host]:server[.screen]
By default, the host, server and screen, which identify your X terminal, are obtained from the environment variable DISPLAY. However, you can also specify them using the -display or -disp option. The host is the name of the machine or terminal, on which the window is to be created, server is the server number, and screen is the screen number (default is 0).
-fn font
You can specify any fixed-width font to be used for text display using the -fn or -font option. The default value is 9x15 if the window is at least 900 pixels wide initially, and fixed otherwise. This can also be specified using the SCRFONT environment variable.
-geometry geometry
By default, the program will create a window that covers most of the display. However, you can specify custom window dimensions and location using the -geometry or -geom option. The format of the geometry string is described in the X Window System User's Guide. This can also be specified using the GEOMETRY environment variable.
-iconic
This option will cause the program to start up in an iconified state, which can be reactivated by double-clicking on the icon.
-rev
This option will cause the program to use reverse video in its display window.
-title name
This option will change the name shown on the window's title bar, which is usually just the program name. It can also be given as -name name.
 

NOTES

Layout should be run from a graphics terminal, or X terminal, in order to view layouts and graphs. It can be run from other types of terminals, to plot out graphs, but no graphs will be displayed on screen.

When you tell layout to suppress the plotting of text in a graph, either by disabling the Plot/Text option, or by enabling the Text/Ignore option for one or more panels, it will plot the files in question by passing them through the HPGL emulator, rather than passing them directly to the output. Because of this, the limitations in the HPGL emulation can affect plotter output. This should not be a problem when using plot files generated by the Spinal Cord Research Centre's data capture and analysis software, but may cause problems if using HPGL plot files obtained from other sources.

Because layout reinitialises the plotter before plotting each panel in the layout file, any instructions you send to the plotter beforehand to set various plotting parameters (like VS, FS, or AS) will have no effect. To get around this problem, you can set the environment variable HPGLINIT to the string of HPGL commands you want performed after an IN instruction. This string will be sent to the plotter for each panel plotted.  

FILES

/usr/neuro/spool/L*                   spooler control files

/usr/neuro/lib/font/*.vfb      binary Hershey font files
 

SEE ALSO

analysis(1), emuhpgl(1), hardcopy(1), sdump(1)
HP 7550A Graphics Plotter Interfacing and Programming Manual
 

Index

NAME
SYNOPSIS
DESCRIPTION
Add
Change
Delete
Empty
Fill
Invert
Layout
Number
Plot
Quit
Rotate
Set-page
Text
Use
View
Write
!command
$ or %
? or /
TEXT LABELING
Add
Copy
Delete
Edit
Font
Grab-text
Ignore
Line
Move
Origin
Pen
Quit
Rotate
Size
Undelete
View
LINE DRAWING
Align-labels
Box-draw
Draw-line
Invert
Quit
Select
Type
Unselect
PLOTTING
All-graphics
File
Plotter
Quit
Screen
Text
Video
HPGL FILES
X WINDOW SUPPORT
NOTES
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 20:21:28 GMT, November 21, 2017
Copyright © G. R. Detillieux, Spinal Cord Research Centre, The University of Manitoba.