PlotView Users Guide

Introduction

Introduction

PlotView (tm) is a plotter emulator program, which makes an Apple Macintosh computer act like a Hewlett-Packard plotter. More specifically, it converts data from the Hewlett-Packard Graphics Language (HP-GL (tm)) into Macintosh screen commands (QuickDraw), thus allowing you to view on the screen of your computer, and subsequently manipulate, information which otherwise would appear simply on a plotter.

This introductory section to the manual explains the basic concepts used by PlotView. The second section presents typical scenarios of operation in a step-by-step fashion. The software reference section provides a menu-by-menu reference to each function in the software.

What's On the Disk?

PlotView is a standalone program which requires no fancy installation. You can leave it on the floppy disk, or copy it to your hard disk. You start PlotView by double-clicking on the application. Double-clicking on PlotView documents produces different actions, which will be described later.

Figure 1. The contents of the PlotView disk

Several sample files are included on the disk as indicated in Figure 1: NMR Data, IR Data, and CAD Data. These are text files which were created and saved by PlotView, as indicated by their icon (PlotView can read a "TEXT" file created by any Macintosh software). In addition, two "PICT" files created by PlotView (NMR Plot, High Resolution IR Plot) are provided. These can be opened and manipulated by a wide variety of Macintosh drawing programs (e.g., MacDraw), or simply read with page layout programs (e.g., Pagemaker). Generally, you'll only copy PlotView itself to your hard disk.

An Overview of the PlotView Menus

Figure 2. The menus

When you launch PlotView, you'll see the non-standard menu arrangement shown in Figure 2. The first menu, the Mode Menu, controls the five basic operating modes of PlotView, which are discussed in the next section. The second menu, the Picture Menu, is initially inactive, but becomes active once a picture has been created by PlotView. This menu controls a variety of actions which affect the picture - saving, printing, resizing, etc.

The next three menus, Pen, Paper, and Font, all control the way in which the HP-GL data stream is interpreted by PlotView. The settings controlled by these menus must all be selected before a picture is drawn.

The final menu, the Communications Menu, controls the communications settings used on the RS-232 (serial) channel. If you will be reading HP-GL input from a text file, this menu is not relevant.

Because PlotView does not not provide for editing pictures, no Edit menu is present as is common in Macintosh applications. This won't cause you any concern within PlotView itself, but if you are running System 6 (or earlier) under Finder and you want to use a desk accessory such as the Scrapbook while using PlotView, you will have to use the keyboard equivalents C, V, and X. Under Multifinder or System 7, this is not an issue since the desk accessories have their own Edit menu.

Operating Modes

PlotView has five operating modes, which are controlled by the Mode Menu. Three of these modes - Plot Input, Plot File, and Plot From Keyboard, provide alternative choices for input for the plot to be displayed on the screen.

The typical mode used to receive data from a scientific instrument or other computer is called Plot Input. In this mode, the communications port (modem port) is opened and data are read as they are transmitted down the RS-232 line, interpreted as HP-GL commands, and the resulting "plot" is displayed on the Mac screen.

In some cases, HP-GL data streams will already be present in a file on the Mac. This file may have been transferred from another computer via floppy disk or network, created by PlotView, created by another communications program, or even created by you using a text editor. Data in this format can be converted to a screen image using the Plot File mode.

A third input mode, useful mainly for programmers, is the Plot From Keyboard mode. Here, an input window is opened into which you can directly enter HP-GL commands. These commands are immediately interpreted and converted to a graphical format by PlotView.

The fourth mode of operation is the output mode, Export File to Plotter. This mode allows you to take a file of stored HP-GL commands and send it back to an HP plotter (or an HP-GL compatible plotter). Thus you can capture a plot one day with PlotView, and plot it another day.

Displaying or Saving the Data Stream

The fifth mode, "simple listener" mode, is triggered by the Display Input Stream and Save Input Stream menu choices. In this mode the communications port is opened, and any characters which arrive are either displayed on screen, saved to a TEXT file, or both. Display of the data stream is most useful for verifying the presence of communications, while data which is saved to a file can be subsequently converted to graphical information using the Plot File mode.

In simple listener mode, no interpretation of the input is performed. Because of this, this mode is the fastest mode, that is, data can be most rapidly input to the Mac. In some situations, however, this mode is not feasible. Some, but not all systems which use HP plotters take advantage of the intelligence of the HP plotters to establish a two-way communication. For example, the remote computer may request the HP plotter to output its error status. If no response is received from the plotter (or from PlotView emulating the plotter), the remote computer may "hang." Other systems may only send information to the plotter, and hence can operate successfully in the "simple listener" mode. For remote computers in this category, it is possible to capture streams of HP-GL commands not only with PlotView but with any of the many communications programs available for the Mac.

Displaying and/or saving the data stream can also be done in conjunction with the Plot Input and Plot From Keyboard modes. Needless to say, every different operation done by PlotView takes time. Data can be displayed, stored, and interpreted graphically simultaneously, but the more that is done, the slower it will happen. Display of the data stream in particular is probably most useful just for brief periods to verify that communication is occurring, and for this reason, you can toggle this display on and off at any time, not just before or after a plot.

Using the Abort Function

No matter which mode is active, the Abort function is always available for two purposes. First, it can be used to prematurely terminate input or output for whatever reason. Second, it must be used to terminate plots which do not terminate themselves, principally incoming plots which do not include a "page" command.

Interpreting the Input - The Pen, Paper, and Font Menus

Some HP-GL commands are invariant, and PlotView interprets them the same every time. For example, the command "PU;" lifts the pen. Other HP-GL commands, however, are in some way dependent on various settings within PlotView. Commands which produce text output, for example, are affected by user-selected choices of font style and size.

The various options which affect the interpretation of input are contained in the Pen, Paper, and Font menus. Although it is possible to change some of these choices while a "plot" is in progress, in general you will first select the desired options, and then initate input using the Plot From Input, Plot File, or Plot From Keyboard modes. All of the choices in the Pen, Paper, and Font Menus can be saved using Save Settings, so that in the future PlotView will automatically select your preferred choices.

"Pen" Choices

HP plotters are equipped with a varying number of pens: 1, 2, 6, or 8, depending on the model. Most users with monochrome screen and output devices will be interested in only two pen "colors": black and gray. Any pen-related commands input into PlotView can be emulated in one of four different ways, which are set by the Pen Menu. "Single pen" operation ignores all pen control commands and maps all colors into one ñ black. In "two pen" operation, there are three alternate mappings from which you can select ñ black can be mapped into even-numbered pens, odd-numbered pens, or pen 1 only; gray will be mapped into the complementary pens. Bear in mind that many of the graphics lines in a plot will be quite short, and a "gray" line may consist of a single black pixel and a single white one, or perhaps even just a single white one! Depending on the typical length of the vectors in your plot, you may find that single pen operation is the only acceptable option.

PlotView can also create pictures with a maximum of eight colors. Each pen (up to eight pens, the maximum number supported by most HP plotters) and the "paper" can be mapped to a selected color using the Full Color choice in the Pen Menu.

Color pictures can be created even on a Macintosh with a monochrome screen; the colors will appear when the resulting PICT file is transferred to a Mac with a color screen.

Normally, the "paper" will be white, and the different pens will take on various colors. It is also possible to generate reverse plots by setting the "paper" to a particular color and the pens to white (or another color). It is also possible to selectively remove information from a plot. If, for example, you know that the captions on a plot will be drawn with Pen #2, you can eliminate them by setting Pen #2 to the same color as the paper.

Pen "width" is an issue depending on what you are doing with the output. PICT resolution, which is screen resolution, is 72 dpi, so that the narrowest line that can be drawn on the screen is 1/72nd of an inch. For many purposes, this will produce a line which appears thick and "crude" when printed on printers which typically have 300 or 600 dpi resolution. The pen menu therefore lets you select pen "widths" of 1/2 or 1/4 thickness. This setting has no effect on what will appear on the screen, but when you print (to a PostScript printer only), the lines will become narrower (note that earlier versions of PlotView produced 1/4 thickness lines only).

The "Paper"

Input to PlotView, whether it comes from a text file or directly from the modem port, will have been generated by another computer program. That computer program will have known, or assumed, a certain paper size of the "plotter" for which it was told it was generating its output. In order for the screen picture produced by PlotView to retain the same aspect ratio as in the original drawing, it is essential that the "paper size" be set before a plot is interpreted using the Paper Menu. Selecting the proper "paper size" will close and then re-open the PlotView output window, with an aspect ratio that matches that of the selected paper.

The Paper Menu contains several other options as well. Draw Paper draws a piece of "paper" around the plot. Group Lines enables you to turn automatic line grouping on and off. Ignore Page Commands allows multiple plots to be concatenated into a single picture.

Standard vs. High Resolution

In its standard resolution mode, PlotView maps the plot to either a "standard" (512 x 322) Macintosh window (when Use Full Screen is not selected in the Paper Menu), or to the full screen (e.g., 1152 x 882 for a 19" monitor) when Use Full Screen is selected. In either case plots appear on the screen as they are being interpreted.

When High Resolution Mode is selected in the Paper Menu, the drawing does not appear on the screen while the interpretation is taking place; only the "wristwatch" cursor is visible. The interpretation is done instead onto a hidden canvas whose size is 2912 x 2208 pixels (or slightly less, depending on the aspect ratio of the paper size chosen). This size is chosen because the number of pixels matches that used by a LaserWriter printing to an 8 1/2 x 11 page. When the plot is done (or when it is prematurely terminated with the Abort option in the Mode Menu), the picture is displayed on the viewing screen (either on a "standard" size screen or the "full" screen depending on the Use Full Screen choice).

When you first use PlotView for a given type of data, it's a good idea to operate in standard resolution mode so that you can quickly verify that interpretation is proceeding correctly. You can then repeat the process with High Resolution Mode turned on if you require higher resolution.

Character Font and Size

Finally, the Font Menu is used to control the fonts which are used for text output. In its default mode, PlotView adjusts the size of text as requested by the remote computer. In some circumstances, however, you will find this produces letters which are unacceptably small, since a small letter on a plotter becomes even smaller when scaled to the size of a Macintosh screen. For this reason, you are given the alternative of using larger or smaller variable font sizes, or of fixing the output point size at 9- or 10-point type. For isolated text labels, this will work well. In other cases, however, the size of the letters will be critical. For example, your remote computer may be plotting multiple lines of text, separated by a distance which it thinks to be sufficient for the character size it is using. If you now force these characters to be 10-pt. type, you may find that successive lines are overlapped vertically. If so, you will have to use variable point size.

The actual font which is used is also a problem in attempting to duplicate an HP plotter. Conventional HP plotters use a monospaced, sans-serif font. Such a font exists on the ImageWriter (Monaco), but not on the LaserWriter. On the LaserWriter, there are sans-serif fonts (Helvetica being the most widely used) and monospaced fonts (Courier) but none which has both characteristics.

Manipulating Graphics

Once a plot has been created on the screen using input from another computer, from a text file, or from the keyboard, that plot can be manipulated using the Picture Menu (the menu will be inactive before a plot has been created). Plots can be printed to an ImageWriterô or LaserWriterô, saved to the Clipboard (and from there to the Scrapbook), or saved to a file. The plot can also be changed in size to one of three preselected sizes (100%, 75%, or 50%) for your convenience. Typically, you might want to do this to give yourself approximately the right size picture to paste into another program.

Because the screen images created by PlotView can contain literally thousands of vectors which can take several seconds to draw, PlotView in some circumstances does not provide the usual "automatic screen refresh" function. Any time that the display has been overwritten, simply use the keyboard command 1 (or 2, 3, or 0) to redisplay the picture in the desired size (100%, 75%, 50%, or "Full Size").

Establishing Communications Settings

The Communications Menu contains only two choices: Standard Settings and Other. Standard Settings selects the communications parameters which are most often used when connecting to HP plotters: 9600 baud, no parity, 8 data bits, 1 stop bit, modem port, and XON/XOFF handshake (if these things don't mean anything to you, this setting is probably the correct one!). Other allows you to modify these settings to cover the full normal range of such parameters. Again, Save Settings will probably be useful to save your choices.

When you launch PlotView, the communications port (either the modem or the printer port) is normally closed, that is, not activated. The port is opened in response to four different menu choices: Plot Input, Export File to Plotter, Display Input Stream, and Save Input Stream. Once opened, the port is closed either when you quit the program, or when the previous conditions are no longer satisfied, that is, when you are neither plotting input, exporting a file, nor displaying or saving the input stream. If you use only the Plot File or the Plot From Keyboard modes of PlotView, the communications port is never opened, so other communications on the same port will be possible while using PlotView as long as you restrict yourself to those two modes, and don't use the Display or Save Input Stream functions.

Limitations of PlotView

A Macintosh is not a Hewlett-Packard plotter and PlotView can not make it one. Resolution of the two devices is not the same. The natural font of an HP plotter is a monospaced, sans-serif font, which can be duplicated on an ImageWriter, but not easily on a LaserWriter. The control of character size, direction, and slant are far more versatile on a real HP plotter. For example, PlotView supports printing of sideways characters to a LaserWriter, but not to an ImageWriter, nor to the screen.

Other differences pertain to the numbers of vectors in a plot. On an HP plotter, you can plot on a single sheet of paper until the paper turns black with ink. If you attempt to do this when plotting to a Macintosh with PlotView, however, you may encounter a variety of limitations due to disk space, memory size, or programmatic limitations. While it is not anticipated that you will encounter any such limitations in the course of normal operation, it is not impossible either.

PlotView does not interpret every command which is part of the HP-GL language definition, only the following: AA, AF, AH, AR, CI, CP, DI, DT, EA, IP, IW, LB, OE, OF, OH, OI, OP, OS, PA, PD, PG, PR, PU, RA, SC, SI, SL, SP, SR, TL, XT and YT. These commands are felt to be the major ones which are in routine use for plotting scientific and engineering data. If the "plot" which appears on your Mac screen does not correspond to the plot which would have appeared on your HP plotter, this particular plot may include a non-interpreted command. Stevens Creek Software is committed to solving your problems. If you have a situation where PlotView produces unacceptable results, please send us both an actual HP hard copy output, and a floppy disk containing the command stream which produced the incorrect result (saved using the Save Input Stream function). We will do our best to provide you with a version of PlotView which can handle your data.

Technical Support

Technical support is provided by e-mail to support@stevenscreek.com. You can also call 408-725-0424 between the hours of 8:30 ñ 5:00 p.m. Pacific time, Monday through Friday, or fax inquiries to the same number 24 hours a day, seven days a week.

Copyright 1988-1997 by Stevens Creek Software
All Rights Reserved