# PlotStripChart

int PlotStripChart (int panelHandle, int controlID, void *yArray, int numberOfPoints, int startingIndex, int skipCount, int yDataType);

## Purpose

Adds one or more points to each trace in a strip chart control.

The right edge of the strip chart is considered a grid line. This grid line can contain a data point. To achieve the best results when repeatedly plotting arrays that exactly fill the width of the strip chart, arrange for the data point that is on the left edge of the strip chart before you plot to be on the right edge of the strip chart after you plot. This action synchronizes your plots with the grid lines. Set the ATTR_POINTS_PER_SCREEN attribute to one greater than the value you pass as numberOfPoints to PlotStripChart. For example, if you intend to add 100 points to the strip chart each time you call PlotStripChart, set ATTR_POINTS_PER_SCREEN to 101.

If you fail to do this and your strip chart is Continuous mode, the grid lines drift across the strip chart.

If you fail to do this and your strip chart is in Sweep mode or Block mode, gaps can arise from the right side of the strip chart. The following example illustrates the scenario:

You set ATTR_POINTS_PER_SCREEN to 100. You call PlotStripChart with 100 points. It plots from 0 to 99. You call PlotStripChart again with 100 points. It plots from 100 to 199. In this situation, LabWindows/CVI never draws the curve between 99 and 100.

Instead of calling SetCtrlAttribute to set ATTR_POINTS_PER_SCREEN, you can use the Points per Screen option in the Edit Strip Chart dialog box of the User Interface Editor.

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
yArray | void * | Array that contains the values to plot along the y-axis. The data type must be of the type specified by yDataType.
numberOfPoints | integer | Number of yArray points to add to the strip chart. This value must be an even multiple of the number traces in the strip chart. This value determines the number of points to plot even if the number of elements in yArray is greater than the numberOfPoints. The default value is 1.
startingIndex | integer | Index of the element in the yArray where the first block of data begins. This value is zero based and must be an even multiple of the number of traces in the strip chart. The default value is 0.
skipCount | integer | Number of yArray elements the function skips after plotting each set of points. The default is 0. Suppose you have an array that contains four data sets (A,B,C,D) and you want to plot each A-B pair into a strip chart control. Consider the following example of element ordering: A B C D A B C D A B C D In the preceding example, entering a skipCount of 2 causes the function to skip each C-D pair before it plots the next A-B pair.
yDataType | integer | The data type of the y array. The following table lists the valid data types.
VAL_CHAR | A single byte character.
VAL_DOUBLE | An 8 byte floating point value.
VAL_FLOAT | A 4 byte floating point value.
VAL_INTEGER | A 4 byte integer.
VAL_SHORT_INTEGER | A 2 byte integer.
VAL_UNSIGNED_CHAR | An unsigned single byte character.
VAL_UNSIGNED_INTEGER | An unsigned 4 byte integer.
VAL_UNSIGNED_SHORT_INTEGER | An unsigned 2 byte integer.

## Return Value

Name | Type | Description
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
Code | Error Message String
xx | Success