plot
Plot values on the display
General form
plot exprs [ylimit ylo yhi] [xlimit xlo xhi] [xindices xilo xihi]
[xcompress comp] [xdelta xdel] [ydelta ydel] [xlog] [ylog] [loglog]
[vs xname] [xlabel word] [ylabel word] [title word] [samep]
[linear] [polar] [smith] [smithgrid] [lingrid] [nogrid]
[linplot] [pointplot] [combplot] [nointerp] [multiplot]
Plot the given exprs in a plot window. The xlimit and ylimit arguments determine the high and low x- and y-limits of the axes, respectively. The xindices arguments determine what range of points are to be plotted - everything between the xilo'th point and the xihi'th point is plotted. The xcompress argument specifies that only one out of every comp points should be plotted. If an xdelta or a ydelta parameter is present, it specifies the spacing between grid lines on the X- and Y-axis. These parameter names may be abbreviated to xl, yl, xind, xcomp, xdel, and ydel respectively.
The xname argument is an expression to use as the scale on the x-axis. If xlog or ylog are present then the X or Y scale, respectively, is logarithmic (loglog is the same as specifying both). The xlabel and ylabel arguments cause the specified labels to be used for the X and Y axes, respectively.
If samep is given, the values of the other parameters (other than xname) from the previous plot, hardcopy, or asciiplot command is used unless re-defined on the command line.
The title argument is used in the place of the plot name as the title of the graph.
The linear keyword is used to override a default logscale plot (as in the output for an AC analysis).
Finally, the keywords polar, smith and smithgrid select a grid for complex data. The grid can also be chosen with set gridstyle = polar (or smith, smithgrid), which applies to later plots that name no grid type.
polar- Concentric magnitude circles with radial lines every 30°. The data is not transformed: each complex value is plotted with its real part on the X axis and its imaginary part on the Y axis, so the angle of a point from the positive real axis is the phase of the value.
smith- A Smith chart grid of constant resistance circles and constant reactance arcs. The data is transformed first, by the function (z−1)/(z+1), so each value is plotted as a reflection coefficient. The values are not divided by a reference impedance, so to plot an impedance it must already be normalised; for a 50 ohm reference, plot
v(in)/50rather thanv(in). Real data is treated as purely resistive. smithgrid- The same Smith chart grid, but with no transformation: the data is plotted with real part on X and imaginary part on Y, directly onto the grid. Use it for values that are already reflection coefficients, such as S11.
In the plot window, these three plots are drawn with a square plot area so that the circles stay round. The Smith grid has no Cartesian axes: resistance values (0.2 to 10) are labelled along the real axis, and the rim is labelled with the phase angle, 0° to 360° anticlockwise from the right, at the end of each reactance arc. The polar grid is labelled with magnitude along the real axis and angle at the rim, and its axes are labelled Real and Imaginary. Hovering over a point reports its value as Re and Im (for a smith plot the value of the vector before the transform, such as the normalised impedance, not the plotted reflection coefficient), and also the scale value (such as the frequency) at that point.
These options set how the grid and the points are drawn; only one grid type and one point type may be given:
lingrid,nogrid- A linear grid, or no grid (as well as
xlog,ylog,loglog,polar,smithandsmithgridabove). linplot,pointplot,combplot- Join the points with lines (the default), draw the points only, or draw a vertical line from each point to the X axis.
nointerp- Join the points directly, without fitting curves through them (see the
polydegreevariable). multiplot- Draw each expression in its own chart, stacked in the plot window, instead of all on one chart.
The Plot dialog builds plot commands with these options.
Examples
Plot a 50 ohm normalised input impedance on a Smith chart, and a complex node voltage on a polar grid:
let z_normalized = v(in) / 50 plot smith z_normalized plot v(2) polar
Plot a reflection coefficient on a Smith grid without transforming it:
plot smithgrid s11