Go to the previous, next section.
You can simply define the hardcopy device with the device
command, then issue the plot commands, and then type
hardcopy
which sends the plot to the hardcopy device.
Or, in the more common scenario, you have put the plot on the screen, and fiddled with it until you were happy with it, and then want to plot it to a hardcopy device. In this case, you make use of the fact that SM saves your plotting commands in a buffer, and you can manipulate that command list. The command
history
will print out the list of commands, in reverse
chronological order (or chronological order with history -).
You can then delete all the commands in that
buffer that you don't want with the DELETE command.
DELETE 1 10
will delete lines 1 through 10
from the history list. Once you have deleted all the lines from the
history list except the ones you used to make the plot on the screen,
you can change devices to the hardcopy device using the device
command, and then type
playback
hardcopy
This will execute the commands in the history list, and then print the
hardcopy plot. In fact, there is a macro hcopy defined to do
this for you. hcopy sets the device to the hardcopy device (as
defined in your .sm file on the printer line), then
does a playback, then sends the plot to the hardcopy device, and
then resets the device type to be whatever it was when you invoked the
hcopy macro.
You don't have to playback all the lines; both hcopy and playback
have optional arguments to specify the range of lines that you want.
You could also define the commands from the history list into a macro, as discussed in section 6, and invoke the macro to execute the plot commands:
macro hcplot 1 20
device qms lca0
hcplot
hardcopy
This will execute the plot commands from the history buffer lines 1 through 20, and then send the plot to the hardcopy device for printing.
An important point to note about the hardcopy devices is that you have
to reissue the device command each time you do a hardcopy
command. This is because the hardcopy plot vectors are actually
written to a file, and this file is closed, sent to the plotter, and
deleted when you issue the hardcopy command. No new file is
opened for you automatically, so you must issue the device
command to open a new plot file if you want another hardcopy plot, or
to redefine the device to a terminal, if that is what you want. You
may be able to use the PAGE command to start a new page without
starting a whole new plot.
Go to the previous, next section.