AddPlotLine (Macro Command)
AddPlotLIne NAME='PlotTabName' X1=StartX Y1=StartY X2=EndX Y2=EndX LINETYPE=SOLID COLOR=Red ARROWTYPE=0 ARROWSIZE=3
Create a line on an existing X-Y or X-Y-Z plot window. The keywords to the left of the = signs can be provided in any order. All keywords except NAME, X1, X2, Y1, Y2 are optional.
NAME=
The text following the = sign an be a string constant (surrounded with single quotes) or a string variable that has been previously defined. The text must be the name that appears on one of the plot tabs. Alternatively, a numerical value can be provided to indicate the plot by its plot tab number. The first plot is number 1.
X1=, Y1=, X2=, Y2=
The values that follow these keywords determine the starting and ending points of the line. The values may be provided with numerical constants or predefined EES variables. Values of 0, 0 correspond to the lower left corner of the plot rectangle. Values of 1, 1 correspond to the upper right corner of the plot rectangle. Note that the PlotCoord function can be used to return the relative position (0 to 1) of a specified value on the X or Y axis.
LINETYPE=
The text that follows this keyword may be an integer between 0 and 9 or any of the following line types:
NONE, SOLID, SOLID2, DOTTED, DASHED, DOTTED2, DASHED2, DASHDOT, DASHDOT2, SOLID3
COLOR=
The color name can be supplied as a string constant or string variable. The colors names are identified in the NewPlot macro. The default is black.
ARROWTYPE=
The integer or EES variable that follows this keyword must be between 0 and 4 corresponding to the following arrow types
0=none
1=filled
2=open
3=simple
4=stick
ARROWSIZE=
The integer or EES variable that follows this keyword must be between 1 and 10.
Example:
$UnitSystem SI K
$RunMacroAfter
DeletePlot 1
F$='CarbonDioxide'
PropPlot F$ PH 3 310 280 250 0 DoQLines
P=P_crit(F$)
h=enthalpy(F$,P=P,x=1)
P$=PlotTabName$(0)
XPos=PlotCoord(P$, 'X', h)
YPos=PlotCoord(P$, 'Y', P)
AddPlotLine P$ X1=0.25 Y1=0.70 X2=Xpos Y2=YPos Text='C' Color=Blue LineType=Solid ArrowType=1 ArrowSize=4
AddPlotText P$ X=0.2 Y=0.70 Text='Crit. Pt' Color=Blue Style=Bold Size=18
$endMacro
See also: OverlayPlot