next up previous contents index
Next: The setscale Command Up: Data Manipulation Commands Previous: The setdim Command   Contents   Index


The setplot Command

The setplot command can be used to set the current plot, or to create a new, empty plot and make it the current plot.

setplot [plotname]
Here, the word ``plot'' refers to a group of vectors that are the result of one WRspice simulation run. Plots are created in memory during a simulation run, or by loading rawfile data. When more than one file is loaded in, or more than one plot is present in one file, WRspice keeps them separate and only shows the vectors in the current plot. One generally accesses a given plot by first making it the current plot.

The same functionality is available from the Plots button in the Tools menu. The setplot command will set the current plot to the plot with the given plotname, or if no name is given, prompt the user with a menu. The plots are named as they are loaded, by reading in a rawfile, or created by running a simulation, with names like tran1 or ac2. These names are shown by the setplot and display commands and are used by other commands.

The plotname can also be a numerical index. Plots are saved in the order created, and as listed by the setplot command without arguments, and in the Plots tool. In addition to the plot name, the following constructs are recognized. Below, N is an integer.

-N
Use the N'th plot back from the current plot. N must be 1 or larger. For example, ``setplot -1'' will set the current plot to the previous plot. The command will fail if there is no such plot.

+N
This goes in the reverse direction, indicating a plot later in the list than the current plot.

N
An integer without + or - indicates an absolute index into the plot list, zero-based. The value 0 will always indicate the ``constants'' plot, which is the first plot created (on program startup).

If the plotname is ``new'', a new plot is created, which becomes the current plot. This plot has no vectors.

The current plot can also be changed by resetting the curplot variable. There are three read-only variables which are reset internally whenever the current plot changes. Each contains a string describing a feature of the current plot. These are curplotdate, curplotname, and curplottitle.


next up previous contents index
Next: The setscale Command Up: Data Manipulation Commands Previous: The setdim Command   Contents   Index
Stephen R. Whiteley 2017-10-02