WRspice data are in the form of vectors, which are lists of numbers that may represent, e.g., time, voltage, or any typed or untyped set of values. Vectors of length one are termed ``scalars''. During a simulation, each of the circuit variables, plus a scale vector, are filled with data from the simulation. For example, in transient analysis, the scale vector (named ``time'') will contain the time values where output is generated, and each node and other circuit variables will have a corresponding vector of the same length as the scale, containing the values for the scale points.
For each simulation, the resulting vectors are contained in a ``plot''. The plot is given a name (such as ``tran2''), and stored in a list with other plots. There is also an internally generated plot named ``constants'' which contains various scalars set to constant values.
An analysis will produce a plot consisting of vectors representing simulated output data. The ``current plot'' is usually the last plot produced by an analysis run, or the constants plot if no analyses have been run or rawfiles loaded. The current plot can be changed with the setplot command, or with the Plots button in the Tools menu. A vector from the current plot or the constants plot can be referenced by name. A vector from any plot can be referenced with the notation
plotname.vecnamewhere plotname is the name of the plot, and vecname is the vector name.
When a plot data file is read into WRspice with the load command, a plot containing vectors is produced, as if the anaylsis had been run. The new plot becomes the current plot.
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.
When using the plotname.vecname construct, internally the vector and its scale are copied into the current plot as temporary vectors. If you do ``plot -1.v(1)'' (for example) it may be surprising to find that the plot title, etc. are from the current plot, and not the source plot.
The default separation character is a period, however this can be changed by setting the variable plot_catchar. If this variable is set to a string consisting of a single punctuation character, that character becomes the separator.