next up previous contents index
Next: The plotwin Command Up: Graphical Output Commands Previous: Selections   Contents   Index


The plot Command

The plot command is used to plot simulation output on-screen. Each execution of a plot command will bring up a window which displays the plot, along with several command buttons. Each plot will remain on-screen until dismissed with the Dismiss button.

plot [expr ... ] [vs x-expr] [attributes]
The set of expressions can be followed with a ``vs x-expr'' clause, which will produce an x-y plot using the values of x-expr as the x scale.

If no arguments are given, the arguments to the last given plot command are used. If the argument list contains a token consisting of a single period (``.''), this is replaced with the vector list found in the first .plot line from the input file with the same analysis type as the current plot. For example, if the input file contains

.tran .1u 10u
.plot tran v(1) v(2)
then one can type ``run'' followed by ``plot .'' to plot v(1) and v(2).

The related syntax .@N is also recognized, where N is an integer representing the N'th matching .plot line. The count is 1-based, but N=0 is equivalent to N=1. The token is effectively replaced by the vector list from the specified .plot line found in the circuit deck.

Vectors and expression results will be interpolated to the scale used for the plot. This applies when using forms like ``tran2.v(2)'' where the tran2 may have a different scale, for example the x-increment may be different, or the data may correspond to internal time points vs. user time points.

The plot style can be controlled by a number of variables (listed below), which can be set with the set command. These define default behavior, as the plot window contains buttons which also determine presentation. The Plot Options tool from the Tools menu of the Tool Control window can also be used to set these variables. The Colors tool from the Tools menu can be used to change the colors used for plotting.

For each of the variables listed in the table below with an asterisk in the middle column, if a variable named _temp_varname is defined, its value will be used rather than that of varname. This allows temporary overriding of the nominal settings of the variables, and is used internally for the zoom-in operation. In addition, there are certain variables such as gridstyle which can be set to one of several keywords. If the keyword itself is set as a boolean variable, it will override the string variable. For example, one could issue ``set gridstyle = lingrid'' to set a nominally linear grid. This can be changed by, for example, ``set loglog'' (or ``set _temp_loglog''), but it is an error to have two or more such keywords set as booleans at a time.

The variables with an asterisk in the middle column can appear in a .options line in a circuit file. The option will be in force when the circuit containing this line is the current circuit.

Many of these attributes can also be set from the plot command line, which will override any corresponding variable, if set. The functionality is as described for the variables. The ``value'' of the variables (if any) should follow the keyword, separated by space and/or an optional `=' character. For values consisting of two numbers, a comma and/or space can delimit the numbers. The variable names that are also recognized as command line keywords are shown with an asterisk in the third column in the table below.

Variable _temp_name? Attribute?
color    
combplot * *
gridsize    
gridstyle    
group * *
lingrid * *
linplot * *
loglog * *
multi * *
nogrid * *
nointerp * *
noplotlogo * *
plotposn    
plotstyle    
pointchars    
pointplot * *
polar * *
polydegree    
polysteps    
scaletype    
single * *
smith * *
smithgrid * *
ticmarks    
title * *
xcompress * *
xdelta * *
xindices * *
xlabel * *
xlimit * *
xlog * *
ydelta * *
ylabel * *
ylimit * *
ylog * *
ysep * *

When a plot is read from a rawfile, defaults for the presentation attributes are set as specified in the rawfile. These can be overridden by reseting the attributes in WRspice, with the exception of the color specification in the rawfile. If given, that color will be used for a particular trace independent of the current setting within WRspice. WRspice never sets the color specification, when writing a rawfile, unless that color was indicated from a previous rawfile. If a certain unalterable color is desired for a trace, the rawfile can be edited with a text editor to specify that color.

Any text typed while the pointer is in the plot window will appear on the plot (and hardcopies). This is useful for annotation. Entered and existing text can be edited and moved. In addition, traces in the plot can be moved to change the order, or moved to other (x-scale compatible) plot windows. The description of the plot window (3.11) contains more information.


next up previous contents index
Next: The plotwin Command Up: Graphical Output Commands Previous: Selections   Contents   Index
Stephen R. Whiteley 2017-11-08