ChartCommand
Chart
chart - plot data points, one by one, on a graph
Synposis
plot1d
[ graph=<c> ] [ curve=<> ] [ xlab=<c>] [ ylab=<c> ] [ title==<c> ] [ xval=<n>] [ yval=<n> ] [ clear ] [ penstyle=<c> ] [ semilog ] [ loglog ] [ linlin ] [ leg.left | leg.center | leg.right ] [ leg.top | leg.middle | leg.bottom ]
Description
The chart statement allows the user to plot data points on a curve. The chart auto-scales to show all data. It can be used, for example, to plot the current-voltage relationship during a series of device simulations over drain voltage.
- graph
- This string allows the graph to be named. Any graphs using the same name will be plotted on the same window pane. This enables multiples lies to put on the same plot surface.
- curve
- This parameter allows the user to specify the name of the line in the legend box of the plot window. This allows additional data points to be added to the same line. Any chart can have multiple curves being plotted on the same plot.
- xlab
- Change the default horizontal axis label
- ylab
Change the default vertical axis label
- title
- Change the title on the graph
- xval, yval
- The x y coordinates to be added to curve specified.
- clear
- The clear parameter specifies whether the graphics screen should be cleared before the graph is drawn. If true, the screen is cleared. It defaults false.
- penstyle
- This parameter specifies the pen-type for the plot. Pens can be defined to have width, color, and a symbol using the pen command.
- semilog, loglog, linlin
These allow the axes to be made linear or log.
- Specify that we want the plot to be semi-log.
- leg.left | leg.center | leg.right
- These boolean parameters allow the user to specify the horizontal position of the legend.
- leg.top | leg.middle | leg.bottom
- These boolean parameters allow the user to specify the vertical position of the legend.
Examples
chart graph=iv curve = idvd xva=1.0 yval=0.0 clear
This command will clear the pane named iv or create it if it doesn't exist, draw a set of axes, and draw a single point belonging to curve idvd.
chart graph=iv curve = idvd xva=2.0 yval=1.0
This command adds a data point to the curve idvd if it does exist or creates it if not.
foreach {set x 0} {x < 10.0} {set x [expr $x + 0.1]} { chart graph=para curve=sq xval = $x yval = [expr $x * $x ] }
This set of commands will draw a quadratic curve in x.