next up previous contents index
Next: The polyg Button: Create/Edit Up: The Side Menu: Geometry Previous: The Place Button: Cell   Contents   Index

The plot Button: Generate SPICE Plot


The plot button, available only in electrical mode, gathers input for plotting via WRspice.

The prompt area displays the command string as it is being built. Clicking on nodes or device ``hidden'' targets (usually indicated by a `+ ' symbol in the device schematic representation) will add hypertext entries to the command string, and will add a marker to the screen at the clicked-on location. One can click anywhere on a wire, or on subcircuit and device connection points to select nodes. Clicking on a marker will delete the marker, and the corresponding entry from the string.

Some devices have ``hidden'' nodes for accessing internal variables for plotting, such as current through a voltage source or the phase of a Josephson junction. By convention, these are indicated with a `+ ' mark in the symbol. For many devices, this will access the current through the device. The marker for a current has an orientation in the direction of positive current flow. Ordinary node markers have no orientation, and access the node voltage.

One can click on reference points to any depth in the hierarchy, though selection requires that the cell be showing as a schematic, and as expanded. To make selections inside a subcircuit that is shown as a symbol, one can use proxy windows (see 3.1.3). Holding down both the Shift and Ctrl keys, and clicking on a subcircuit instance, will bring up a sub-window displaying the master of the clicked-on instance in schematic form. One can click on objects in this window in the normal way, and plot points will be added to the prompt line.

Holding the Shift key while clicking on a device of subcircuit not over any node or ``hidden'' location will enter the hypertext device or subcircuit name. These are not often needed in plot command strings, and the requirement of holding down Shift prevents unwanted returns.

Markers can be deleted by clicking on them, or by deleting the corresponding hypertext in the prompt line. Multiple markers can reference the same node, as long as they are spatially distinct.

Existing marks can be dragged and dropped to a new location, which must also reference a node or reference point, as for the initial placement. If dropped on an existing plot mark, the two marks will exchange locations, both as marks in the drawing window, and hypertext entries in the prompt line.

The prompt line text is equivalent to the string given to the plot command in WRspice. The string can be edited in the usual way. The user can add text to combine the hypertext references into expressions involving other syntax elements known to WRspice. The registers available through the S and R buttons to the left of the prompt line can be used to save and restore plot command strings.

The WRspice parser can distinguish the expressions, however in some cases the user must intervene to force an expected result. For example,

v(1) -v(2)
will be interpreted as (v(1)-v(2)), i.e., the difference. To force a unary minus interpretation, one can enclose the second token in double quotes or parentheses, i.e. v(1) "-v(2)" will plot v(1) and negative v(2). Note that white space is not considered when interpreting the expression, and is required only to separate identifier names.

One should refer to the WRspice documentation for a complete description of the syntax accepted by the plot command. The command line can also contain keyword assignments which override defaults used when composing the plot. It is also possible to produce X-Y plots by using the ``vs'' keyword. The expression following ``vs'' will be used as the X scale for the other expressions.

The color used to render a plot reference mark in the schematic will be the same color used for the plot trace of the result to which the corresponding hypertext contributes (however, if the user has changed the plotting colors in WRspice or Xic, this may not be true). The number (or letter) enclosed by the plot mark represents a count of the hypertext entries found in the prompt line, left to right, starting with 1.

If Xic detects a syntax error, one or more plot marks may be rendered with ``no'' color (actually the highlighting color is used). This is also true for the marks used in the X-scale of an X-Y plot.

The Enter key terminates entry, and creates the plot if WRspice is available, and the circuit has been simulated with the run command. In the deck command, the string will be added to the SPICE listing, when generated, as a .plot line.

While the plot command is active, it is possible to select text labels in the normal way, other selections are inhibited. This allows labels to be selected and modified without having to explicitly terminate the plot command first.

The command text and mark locations are saved with the cell data when written to disk, thus the plot command string is persistent.

next up previous contents index
Next: The polyg Button: Create/Edit Up: The Side Menu: Geometry Previous: The Place Button: Cell   Contents   Index
Stephen R. Whiteley 2017-03-22