PlotXYLine
Plots values from two different tables. Values from one table are considered X coordinates, and values from the other are considered Y coordinates. Points are plotted between the low and high scale values specified for x and y. The line is plotted inside the frame defined by the PlotGrid() function.
For each line, you can specify a different pen style, color, and width, and a different marker style and color. You can draw lines either from left to right or from right to left. You need to first call the PlotOpen() function to get the handle for the plot (hPlot) and specify the output device. You should then use the PlotGrid() function to set up the frame and grid, before you call this function to plot the line.
Syntax
PlotXYLine(hPlot, PenStyle, PenCol, PenWidth, MarkerStyle, MarkerCol, nMarker, Length, xTable, LoXScale, HiXScale, YTable, LoYScale, HiYScale, Mode)
hPlot:
The plot handle, returned from the PlotOpen() function. The plot handle identifies the table where all data on the plot is stored.
PenStyle:
The style of the pen used to draw:
0 - Solid
1 - Dash ( - - - - - )
2 - Dot (...............................)
3 - Dash and dot ( - . - . - . - . - )
4 - Dash, dot, dot ( - . . - . . - . . - )
5 - Hollow
PenCol:
The color of the pen (flashing color is not supported). Select a color from the list of Predefined Color Names and Codes or create an RGB-based color using the function MakeCitectColor.
PenWidth:
The width of the pen, in pixels. If the width is thicker than one pixel, you need to use a solid pen (PenStyle = 0). The maximum width is 32.
MarkerStyle:
The style of the markers:
0 - No markers
1 - Triangle
2 - Square
3 - Circle
4 - Diamond
5 - Filled triangle
6 - Filled square
7 - Filled circle
8 - Filled diamond
20 - 32000 - User-defined markers. You can register any symbol as a marker with the PlotSetMarker() function. Call the PlotGetMarker() function to recall the number of a marker you have previously registered.
MarkerCol:
The color of the markers (flashing color is not supported). Select a color from the list of Predefined Color Names and Codes or create an RGB-based color using the function MakeCitectColor.
nMarker:
The number of samples between markers.
Length:
The length of the array, that is the number of points in the table pTable for PlotLine(), or in tables xTable and yTable for PlotXYLine().
For every line you draw with the PlotLine() and PlotXYLine() functions within a plot, you need to add the Length arguments for each call, and pass the total to the PlotGrid() function (in the nSamples argument).
xTable:
The x coordinates for the points in the line, as an array of floating point values.
LoXScale:
The lowest X-axis value that will be displayed on the plot (that is the X-coordinate of the origin of your grid). The LoXScale and HiXScale values determine the scale of your grid. This scale is used to plot values. for example, If LoXScale = 0 (zero) and HiXScale = 100, a value of 50 will be plotted half way along the X-axis of your grid.
LoXScale needs to be in the same units as the values in xTable.
HiXScale:
The highest X-axis value that will be displayed on the plot. The LoXScale and HiXScale values determine the scale of your grid. This scale is used to plot values. for example, If LoXScale = 0 (zero) and HiXScale = 100, a value of 50 will be plotted half way along the X-axis of your grid.
HiXScale needs to be in the same units as the values in xTable.
yTable:
The y coordinates for the points in the line, as an array of floating point values.
LoYScale:
The lowest Y-axis value that will be displayed on the plot (that is the Y-coordinate of the origin of your grid). The LoYScale and HiYScale values determine the scale of your grid. This scale is used to plot values. for example, If LoYScale = 0 (zero) and HiYScale = 100, a value of 50 will be plotted half way up the Y-axis of your grid.
LoYScale needs to be in the same units as the values in xTable.
HiYScale:
The highest Y-axis value that will be displayed on the plot. The LoYScale and HiYScale values determine the scale of your grid. This scale is used to plot values. for example, If LoYScale = 0 (zero) and HiYScale = 100, a value of 50 will be plotted half way up the Y-axis of your grid.
HiYScale needs to be in the same units as the values in xTable.
Mode:
The origin of your grid, and the direction of the plotted line:
1 - Origin is bottom-left, x is left to right, y is upwards
2 - Origin is bottom-right, x is right to left, y is upwards
4 - Origin is top-left, x is left to right, y is downwards
8 - Origin is top-right, x is right to left, y is downwards
Return Value
0 (zero) if successful, otherwise an error is returned.
Related Functions
PlotClose, PlotDraw, PlotGrid, PlotInfo, PlotLine, PlotMarker, PlotScaleMarker, PlotText, TrnPlot
Example
See PlotOpen
See Also