NCL Website header
NCL Home > Documentation > HLUs > API

NhlRemoveAnnotation

The Fortran name of this function is NhlFRemoveAnnotation.

This function removes an arbitrary View object annotation from a Plot Object, destroying its AnnoManager object.


C Synopsis

#include <ncarg/hlu/hlu.h>
#include <hfile for Plot Object>

NhlErrorTypes NhlRemoveAnnotation(
	        int	plot_id,
		int	anno_manager_id
		)

Fortran Synopsis

      subroutine NhlFRemoveAnnotation(plot_id, anno_manager_id, ierr)
      integer plot_id, anno_manager_id, ierr

Arguments

plot_id (input)
Identifier of the plot object from which the View object annotation is to be removed.
anno_manager_id (input)
Identifier of the AnnoManager for the View object annotation to be removed.
ierr (output, Fortran only)
Error code.

Types

Type name:		NhlTErrorTypes
Definition:
typedef enum _NhlErrType{
	NhlFATAL	= -4,	/* "FATAL"	*/
	NhlWARNING	= -3,	/* "WARNING"	*/
	NhlINFO		= -2,	/* "INFO"	*/
	NhlNOERROR	= -1	/* "NOERROR"	*/
} NhlErrorTypes;

Description

Use this function to remove a user-created external annotation from a plot object. Along with the plot object's id, you must supply the identifier of the controlling AnnoManager object. If you have only the view id, you can always retrieve the AnnoManager's id by getting the value of the View resource vpAnnoManagerId. Assuming the object ids are valid, the plot object destroys the AnnoManager object, and removes the ids of the View object and the AnnoManager from the array resources pmAnnoViews and pmAnnoManagers This removes any further association between the View object and the plot object. Note that you are responsible for destroying the View object when you are finished with it.

Return Values

The NhlRemoveAnnotation C function returns a value of type NhlErrorTypes, and the NhlFRemoveAnnotation Fortran subroutine returns the error value in ierr. The following table indicates what the various return Error Values mean:
Value	|			Meaning
--------+-------------------------------------------------
NOERROR	|	view successfully removed from the plot object  
--------+-------------------------------------------------
INFO	|	minor recoverable error
--------+-------------------------------------------------
WARNING	|	recoverable error
--------+-------------------------------------------------
FATAL	|	The function was unsuccessful


See Also