originating document: layout.wpd McCrea, June 10/98
layout - HPGL graphic layout editor to assembles output graphs or graphics created by the analysis software (e. g. analysis, qm) into a single file
that can be printed or exported to other programs.
layout file or layout -u file or layout -p file
*********** overview and history
Layout was created during a time in which carnivorous reptiles ruled the earth and few comprehensive programs for dealing with text and graphics existed. The decision was made to use HPGL as the standard graphics output from all analysis programs. HPGL is a language specification developed for pen plotters by Hewlet Packard. It is vector based and not a bit map format. Unix programs (Qnx, Linux) that create HPGL data files include, analysis, qm, raster, wtsum and layout. HPGL has become a defacto industry standard and most word processors and graphics programs can directly import and export HPGL files.
Programs such as Corel Draw permit easier manipulation of text and graphics and publication quality outputs. As such, most final versions of our figures for publication or making slides are now produced in CorelDraw. Analysed data is exported a file in HPGL format and then moved to Windows machine and imported into CorelDraw. HPGL files can be interpreted and printed directly by HP laser printers. Thus this format remains very flexible and useful for our files.
When layout was written, it was important to have complete control of HP plotters like the HP7475 and its relatives. With the demise of plotters in the lab, some aspects of the layout program are no longer very useful. Descriptions of these little used options are in smaller green font in this Manual and in most cases can be ignored.
Layout remains very useful for automated analyses where"templates" are created into which the output of analyses can be read and plotted automatically. Multiple graph(ic)s can be printed on a single page. Because layout was created to compliment the analysis programs running in the Unix environment, scripts can be written to link the operations of analysis, graphics assembly and printing and automate data manipulation.
********** printing vs. plotting
In this documentation, the terms print and plot are used interchangeably. You should be aware that printing and plotting to a HP laser printer are different. A print operation generates a raster image of the file to be output and sends that image to the printer. A plot operation sends vectors to the printer that must be interpreted before output. HPGL vector files can be very large and may cause problems with printers with insufficient memory. The hardcopy program is used internally by layout for HPGL output. The sdump program is used raster graphics output. Hardcopy and sdump can also be used directly from the command line. As far as the user is concerned, the major difference between printing and plotting to a laser printer is the scaling of the data with a plot operation creating an image that fills more of the paper than a screen dump.
Layout allows you to create and maintain layout files, which specify the layout of plots on a page. The HP plotter spooler program (hardcopy (1)), plots only one job (one graph) per page. With layout, you can create a composite file in which several plots are placed on a single page in "panels". Panels can be filled with HPGL plot files, and the whole layout printed (plotted) or saved to disk as a single page.
If the file argument is given, layout loads the named file for editiing. This file must be in the HPGL format. Most often the graphics file was created using the Plot/FIle or Hardcopy/File operation from analysis or qm. This file can have any valid name but for subsequent importing into Corel draw, we suggest naming HPGL files with a ".plt" extension.
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. The most common use of the -u option is to automate the printing of graphs. To accomplish this a layout file must be first created that is used as a template for subsequent plotting. This template file is created in layout and is simply a layout file in which panels are added, sized and labeled but not "filled" with data. This file is saved and used with the layout -u command within a script file.
Insert script here For example, assume that you have created a template file with the name of "4panels" in which there are 4 (empty)
panels on a page. The following script directs data files into layout using this template. In this script, the first 4 .plt files found in the
current directory are assembled in layout and printed using hardcopy. Note that the page will only be plotted (printed) when the four
panels are filled.
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 printing an existing layout file, without entering 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 the 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 for adding, deleting and changing panels. A layout file may contain up to 256 panels. Each panel is numbered sequentially with its number appearing in the bottom-left corner. panel. Panel order (i.e. numbers) can be changed (see below). Layout is also used to put text labels in these panels and attaches file names to panels. Layout does not modify the original files in any way. The output of layout may be sent to the printer or exported to a file (see Plotting below)
An arrow also appears in each panel, indicating the orientation (normal or rotated 90 degrees) of the graphics which will be plotted in this panel. An operation is initiated by typing 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.
***********At the bottom of the display, layout prints the following menu:
Add add a new panel to the layout
Change change the size or location of an existing panel.
Delete delete a panel
Empty unlink a data file from a panel (remove panel contents)
Fill link a data file to a panel (attach a graphic file to a panel)
Invert flip X or Y orientation of panels
Layout load on a new layout file
Number renumber panels
Plot sub menu for printing data or saving to a file in HPGL format
Rotate landscape or portrait panel orientation
Set-page set page origin on HP plotters
Text sub menu for creation and manipulation of text labels
Use send the current layout to the printer, used in scripts and with the -u option
View display graphics, panels or both
Write save the current layout file
Add the next panel number to the end of the sequence. Select the place on the page to put the panel using the mouse. Left click to set
the panel origin (usually the bottom-left corner) Middle click to set the opposite (top-right) corner. You can hold down either button to
drag the corresponding corner 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. Right clicking (or typing a "d" on the keyboard) quits the panel
Fine adjustments may be made to the position of the last corner selected (or of the origin, initially) by using the arrow keys in single grid increments (see below). The last position adjustment can be undone by using the U key.
You can copy an existing panel size by using the # key. You are prompted for the number of the panel to be copied. You can then move the new panel to its desired position with the mouse. Depressing the left mouse button while moving the cursor. will keeping the panel size constant.
As you adjust the position of either corner of a panel, 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 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 D or the Right mouse button when you are done, to go on to the next panel. To stop adding panels, and return to the main menu, press button D (or Right mouse) again, before setting either of the corners. This operation also terminates automatically if 256 panels are created.
Change the size or location of an existing 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. Use the mouse to set the bottom-left and top-right coners, as for the Add operation above. Right mouse click (or type D) to return to the main menu.
Panel size or location can be changed directly with the mouse by clicking on it. (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 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 a panel, i.e. remove any graph that is attached to the panel. You are prompted for the number of the panel to be emptied. The File name attached to the specified panel is 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. The independence of data files and labels is very useful for automated data analysis. Text labels in the panels can be removed using the Text/Delete operation.
Fill a panel, i.e. attach a graph(ic) stored in a plot file to the panel. If there are no panels, one is created which occupies 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 which is then indicated on the display next to the panel number. For those interested in programming, the section "HPGL FILES" below has a description of valid plot file format.
Note that plot files are 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 flips panels in the X, Y or in Both directions. Inverting panels is most useful when switching between small and large page sizes since the plotter performs rotation differently for the two page sizes.
Layout chooses a new layout file to edit. If you have made any changes to the current layout you will be asked whether you want to save the current layout. You are prompted to enter the name of the new layout file to be edited. 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 renumbers panels. You are prompted for the number of the panel you wish to renumber. and then the new panel number. The chosen panel is removed from the sequence, ad 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 brings up the plotting subsystem menu:
All-graphics File Plotter Quit Screen Text Video
Plot/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.
Plot/File stores data and text assembled in layout in a file. This file is a text file with the graphics in HPGL format. The file can be exported to the PC environment and read into a word processor or graphics program. You can also print the layout file in the Unix environment at a later time, using hardcopy (1). This file can have any valid name but for subsequent compatibility with Corel draw, name all HPGL files with a ".plt" extension. You must supply the extension, layout does not append an extension.
Plot/Plotter plots the graph directly on the plotter which in most cases is an HP compatible laser printer. The hardcopy program is invoked to plot the displayed graph in vector format. 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 isenabled. If large files crash the memory of the printer device, buy more memory for the printer, or use the Plot/Video option.
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.
Plot/Quit returns to the main menu of layout.
Plot/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.")
Plot/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.
Plot/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 the sdump program. This is a raster image. The same thing can be accomplished by pressing the 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.
Quit exits layout.
Rotate changes panel orientation to either no rotation or a 90 degree clockwise rotation. If there are no panels, one is created which occupies 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. 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 specifies HP plotter P1 and P2, parameters which set page size. In most cases ignore this command and change settings in your favourite graphics program on the PC (e. g. Corel Draw). The default values correspond to 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 alows 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 .BR 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. .SS 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.
TEXT displays a single panel on screen, and allows editing 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.
Many of the layout commands available for dealing with text are no longer useful. It is far easier to deal with text using a high end program such as Corel Draw.
There are two approaches to editing 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
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 themost 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.
Text/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.
Text/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.
Text/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 int 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.
Text/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.
Text/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 s 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 .RB ( - ) 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 .BR 10 , to select proportional spacing.
If the Hershey font name is preceded by a plus sign .RB ( + ), 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 .RB ( * ), 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 avaiable 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, .BR 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 .BR 0 , to get the standard ASCII fixed-spaced character set, or .BR 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.
Text/Grab-text This selection allows you to extract the text labels from the panel's attached PGL 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.
Text/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.
Text/Line This selection allows you to convert the selected label or labels to line segments. This operation is meant as a "quick and dirty" way to add lines to existing graphics, until a more general set of graphics operations is added to the layout program. There is no good reason to use this command and ever reason to avoid it if the graphics file will ever be exported to another program.
The recommended way of creating line segments is first to use the Add operation above to create a label consisting of a single space character. The label can then be converted to a line segment with this operation, and then moved, rotated, and resized using the Move , Rotate , and Size/Width operations below, respectively. If a line-type other than solid (e.g. dashed or dotted) is desired, the text of the label can be changed, using the Edit operation, to any valid argument for the HPGL LT instruction. .. This selection allows you to add and modify line segments and oxes in the current panel. A new menu is presented. See "LINE DRAWING" below, for a description of the line drawing sub-system.
Text/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, left clicking moves the box that surrounds the label or labels 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. Middle clicking 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 arrow keys for up, down, left, or right movement in single grid increments (grid spacing is adjustable, see below), respectively. 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, byspecifying 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.
Text/Origin changes the way labels are aligned with respect to their origins (i. e. justification and alignment). 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. .The 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 selection 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.
Text/Pen changes 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.
Text/Quit returns you to the main layout menu.
Text/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.
Text/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 .BR 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.
Text/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 te 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.
Text/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.
Text/Line adds and modifies 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
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.
Text/Line/Align-labels aligns 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.
Text/Line/Box-draw draws one or more rectangular box outlines.
To draw a rectangle, point the cursor to the position where one corner of the box (the origin) is to be drawn, then press and hold the Left mouse button 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. To draw a square, holding the middle button while dragging the box.
Additional boxes may now be drawn by again pressing a button and dragging the cursor. Beginning a new box by pressing the middle button 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, right click to return to the menu. Pressing the % and + keys accomplishes the same thing as in the Change and Text/Move operations (toggle units and change grid spacing). Text/Line/Draw-line draws one or more line segments.
To make arbitrary lines, point the cursor to the position where one end of the line segment (the origin) is to be drawn, then press the Left mouse button 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. To make horizontal or vertical lines, use the middle mouse button while dragging.
Additional line segments may now be drawn by again pressing a button and dragging the cursor. Beginning a new line segment by pressing the middle mouse button will cause the origin of the new line segment to be at the end point of the last line segment, rather than the cursor position. When you are finished drawing boxes, right clicking or typing D will return you to the menu. Pressing the % and + keys accomplishes the same thing as in the Change and Text/Move operations. Text/Line/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.
Text/Line/Quit returns to the Text menu.
Text/Line/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.
Text/Line/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 typespecification, 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.
Text/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.
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 specifies what is displayed on the screen. Options are 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. This default 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 te Plot/All-graphics option is not currently set.
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 .BR 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.
*********** Flooby Dust
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 , .BR 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. .so /usr/neuro/doc/xwinsupp.man
NOTES Layout must be run from a MASSCOMP graphics terminal, or X terminal, in order to view layouts and graphs. Graphics will not be displayed on other types of terminals.
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 CordResearch 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.
/u /usr/neuro/spool/L* spooler control files
/usr/neuro/lib/font/*.vfb binary Hershey font files
/usr/lib/font/*.vf MASSCOMP Hershey font files
SEE ALSO analysis(1), emuhpgl(1), hardcopy(1), sdump(1) .br "HP 7550A Graphics Plotter Interfacing and Programming Manual"