Admin Production ni-theme
Current Publication

DeleteGraphPlot

LabWindows/CVI

DeleteGraphPlot

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

Purpose

Deletes one or all plots from a graph control.

Supported Controls

You can use DeleteGraphPlot with graph controls.

Parameters

Input
Name Type Description
panelHandle int Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel.
controlID int 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 functions such as NewCtrl and DuplicateCtrl.
plotHandle int 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 int 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 int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Examples

Refer to the following examples that use the DeleteGraphPlot function:

  • userint\getuserevent.cws

    Open example
  • userint\graphcursors.cws

    Open example
  • userint\graphs.cws

    Open example
  • userint\GraphZooming.cws

    Open example
  • userint\TimeDateUnits.cws

    Open example
  • userint\custctrl\colorpicker\colorpickerdemo.cws

    Open example