# DeleteGraphPlot

int DeleteGraphPlot (int panelHandle, int controlID, int plotHandle, int refresh);

## Purpose

Deletes one or all plots from a graph control.

## 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.
plotHandle | integer | Handle for the particular plot to delete or –1 to delete all plots in the graph control. You can obtain plotHandle from one of the following functions: PlotX PlotY PlotXY PlotWaveform PlotPoint PlotText PlotLine PlotRectangle PlotPolygon PlotOval PlotArc PlotIntensity PlotScaledIntensity PlotBitmap
refresh | integer | Selects when to refresh the graph control. The following choices are valid: VAL_DELAYED_DRAW = delayed draw VAL_IMMEDIATE_DRAW = immediate draw VAL_NO_DRAW = no draw If refresh is VAL_DELAYED_DRAW, the deleted plot remains on the graph until one of the following actions takes place: You rescaled the graph. You change the size of the plot area. You expose the plot area after hiding or overlapping it. You set ATTR_REFRESH_GRAPH to 1. You call RefreshGraph. You add another plot to the graph while ATTR_REFRESH_GRAPH is 1. When one of the above events occurs, LabWindows/CVI redraws the entire plot area. If refresh is VAL_IMMEDIATE_DRAW, the plot area is redrawn immediately and the deleted plot is removed from the graph. If refresh is VAL_NO_DRAW, the deleted plot remains on the graph until one of the following actions takes place: You rescale the graph. You change the size of the plot area. You expose the plot area after hiding or overlapping it, and ATTR_SMOOTH_UPDATE is 0.

## 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