Contour


Functions

Boolean_t TecUtilContourLevelX (ArgList_pa ArgList)
  Modify the contour levels.
Boolean_t TecUtilContourLevelAdd (int NumEntries, const double *RawData_Array, Boolean_t ShowTrace)
 
Boolean_t TecUtilContourLevelNew (int NumEntries, const double *RawData_Array, Boolean_t ShowTrace)
 
Boolean_t TecUtilContourLevelDeleteRange (double RangeMin, double RangeMax, Boolean_t ShowTrace)
 
Boolean_t TecUtilContourLevelReset (int NumEntries)
 
Boolean_t TecUtilContourLevelDelNearest (double Level, Boolean_t ShowTrace)
 
Boolean_t TecUtilContourLabelX (ArgList_pa ArgList)
  Manage contour line labels in your plot.
Boolean_t TecUtilContourLabelAdd (double X, double Y, double Z, Boolean_t IsAligned)
 
Boolean_t TecUtilContourLabelDeleteAll (void)
 
Boolean_t TecUtilContourGetLevels (SmInteger_t ContourGroup, LgIndex_t *NumLevels, double **LevelValues)
  Gets the number of contour levels and contour level values currently defined for the specified contour group.
Boolean_t TecUtilQueryColorBandsInUseForContourGroup (SmInteger_t ContourGroup)
  Query to see if a color band is in use in the a contour group.
SetValueReturnCode_e TecUtilContourSetVariableX (ArgList_pa ArgList)
  Assign which variable to use for contouring a specific contour group.
SetValueReturnCode_e TecUtilContourSetVariable (EntIndex_t NewVariable)
  Assign which variable to use for contouring.


Function Documentation

Boolean_t TecUtilContourGetLevels ( SmInteger_t  ContourGroup,
LgIndex_t NumLevels,
double **  LevelValues 
)

Gets the number of contour levels and contour level values currently defined for the specified contour group.

The LevelValues array must be deallocated by the addon using TecUtilArrayDealloc().

Parameters:
ContourGroup The contour group of interest and must be an integer between 1 and 8.
NumLevels Pointer to an LgIndex_t variable that will receive the current number of levels for the specified contour group.
LevelValues Pointer to a double pointer variable that will receive the allocated double array of level values or NULL if there are none
Returns:
FALSE if an allocation error occured otherwise TRUE.
Precondition:
NumLevels Pointer must be a valid address and non-NULL.

LevelValues Pointer must be a valid address and non-NULL.

Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilContourGetLevels(
   &                   ContourGroup,
   &                   NumLevels,
   &                   LevelValues)
    INTEGER*4       ContourGroup
    INTEGER*4       NumLevels
    REAL*8(*)       LevelValues

Python Syntax:

    This function is not supported in Python.

Fetch the number of contour levels for contour group 2:

   Boolean_t IsOk;
   LgIndex_t NumLevels;
   double    *LevelValues;

   TecUtilLockStart(AddOnID);
   IsOk = TecUtilContourGetLevels(2, &NumLevels, &LevelValues);
   if (IsOk)
     {
       if (NumLevels != 0)
         {
           LgIndex_t LIndex;
           printf("There are %d levels for contour group #2:\n",
                  NumLevels);
           for (LIndex = 0; LIndex < NumLevels; LIndex++)
             printf("  %lg\n", LevelValues[LIndex]);
           TecUtilArrayDealloc((void **)&LevelValues);
         }
       else
         printf("No levels are specified for contour group #2\n");
     }

     TecUtilLockFinish(AddOnID);

Boolean_t TecUtilContourLabelAdd ( double  X,
double  Y,
double  Z,
Boolean_t  IsAligned 
)

Deprecated:
Please use TecUtilContourLabelX() instead.

Python Syntax:

  Results = TecUtil.ContourLabelAdd(X, Y, Z, IsAligned)

  Input:
                  X                    double
                  Y                    double
                  Z                    double
                  IsAligned            boolean
  Output:
    Results[0]    ReturnVal            boolean

Boolean_t TecUtilContourLabelDeleteAll ( void   ) 

Deprecated:
Please use TecUtilContourLabelX() instead.

Python Syntax:

  Results = TecUtil.ContourLabelDeleteAll()

  Output:
    Results[0]    ReturnVal            boolean

Boolean_t TecUtilContourLabelX ( ArgList_pa  ArgList  ) 

Manage contour line labels in your plot.

Parameters:
ArgList Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions.


Arglist Values

SV_CONTOURLABELACTION
Type: ContourLabelAction_e
Arg Function: TecUtilArgListAppendInt()
Required: Yes
Notes: The possible values are: ContourLabelAction_Add and ContourLabelAction_DeleteAll

SV_CONTOURGROUP
Type: SmInteger_t
Arg Function: TecUtilArgListAppendInt()
Default: 1
Required: No
Notes: Indicates which contour is affected.

SV_X
Type: double
Arg Function: TecUtilArgListAppendDouble()
Default: 0.0
Required: No
Notes: This option is only applicable for SV_CONTOURLABELACTION set to ContourLabelAction_Add.

SV_Y
Type: double
Arg Function: TecUtilArgListAppendDouble()
Default: 0.0
Required: No
Notes: This option is only applicable for SV_CONTOURLABELACTION set to ContourLabelAction_Add.

SV_Z
Type: double
Arg Function: TecUtilArgListAppendDouble()
Default: 0.0
Required: No
Notes: This option is only applicable for SV_CONTOURLABELACTION set to ContourLabelAction_Add in a 3D plot.

SV_ISALIGNED
Type: Boolean_t
Arg Function: TecUtilArgListAppendInt()
Default: TRUE
Required: No
Notes: If TRUE the contour label is aligned along the contour line otherwise it is drawn horizontally. This option is only applicable for SV_CONTOURLABELACTION set to ContourLabelAction_Add.


Returns:
TRUE if successful, FALSE if not.
Precondition:
ArgList Argument list must be valid.

Must have one or more frames.

Current frame must have a data set with at least one zone.

Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilContourLabelX(ArgListPtr)
    POINTER (ArgListPtr, ArgList)

Python Syntax:

  Results = TecUtil.ContourLabelX(ArgList)

  Input:
                  ArgList              dictionary
  Output:
    Results[0]    ReturnVal            boolean

Add a contour label at position (0.5, 0.25) in a 2-D plot. Make it align itself to the nearest contour line.

   ArgList_pa ArgList;
   TecUtilLockStart(AddOnID)
   ArgList = TecUtilArgListAlloc();

   TecUtilArgListAppendInt(ArgList, SV_CONTOURLABELACTION, ContourLabelAction_Add);
   TecUtilArgListAppendDouble(ArgList, SV_X, 0.5);
   TecUtilArgListAppendDouble(ArgList, SV_Y, 0.25);
   TecUtilArgListAppendInt(ArgList, SV_ISALIGNED, TRUE);

   TecUtilContourLabelX(ArgList);

   TecUtilArgListDealloc(&ArgList);
   TecUtilLockFinish(AddOnID);

Boolean_t TecUtilContourLevelAdd ( int  NumEntries,
const double *  RawData_Array,
Boolean_t  ShowTrace 
)

Deprecated:
Please use TecUtilContourLevelX() instead.

Python Syntax:

  Results = TecUtil.ContourLevelAdd(NumEntries, RawData_Array, ShowTrace)

  Input:
                  NumEntries           int
                  RawData_Array        list of doubles
                  ShowTrace            boolean
  Output:
    Results[0]    ReturnVal            boolean

Boolean_t TecUtilContourLevelDeleteRange ( double  RangeMin,
double  RangeMax,
Boolean_t  ShowTrace 
)

Deprecated:
Please use TecUtilContourLevelX() instead.

Python Syntax:

  Results = TecUtil.ContourLevelDeleteRange(RangeMin, RangeMax, ShowTrace)

  Input:
                  RangeMin             double
                  RangeMax             double
                  ShowTrace            boolean
  Output:
    Results[0]    ReturnVal            boolean

Boolean_t TecUtilContourLevelDelNearest ( double  Level,
Boolean_t  ShowTrace 
)

Deprecated:
Please use TecUtilContourLevelX() instead.

Python Syntax:

  Results = TecUtil.ContourLevelDelNearest(Level, ShowTrace)

  Input:
                  Level                double
                  ShowTrace            boolean
  Output:
    Results[0]    ReturnVal            boolean

Boolean_t TecUtilContourLevelNew ( int  NumEntries,
const double *  RawData_Array,
Boolean_t  ShowTrace 
)

Deprecated:
Please use TecUtilContourLevelX() instead.

Python Syntax:

  Results = TecUtil.ContourLevelNew(NumEntries, RawData_Array, ShowTrace)

  Input:
                  NumEntries           int
                  RawData_Array        list of doubles
                  ShowTrace            boolean
  Output:
    Results[0]    ReturnVal            boolean

Boolean_t TecUtilContourLevelReset ( int  NumEntries  ) 

Deprecated:
Please use TecUtilContourLevelX() instead.

Python Syntax:

  Results = TecUtil.ContourLevelReset(NumEntries)

  Input:
                  NumEntries           int
  Output:
    Results[0]    ReturnVal            boolean

Boolean_t TecUtilContourLevelX ( ArgList_pa  ArgList  ) 

Modify the contour levels.

Parameters:
ArgList Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions.

Arglist Values

SV_CONTOURLEVELACTION
Type: ContourLevelAction_e
Arg Function: TecUtilArgListAppendInt()
Required: Yes
Notes: The contour level action you want to take. See Table below for more details.

SV_CONTOURGROUP
Type: SmInteger_t
Arg Function: TecUtilArgListAppendInt()
Default: 1
Required: No
Notes: Number of the contour group to be modified.

SV_NUMVALUES
Type: int
Arg Function: TecUtilArgListAppendInt()
Default: 0
Required: No
Notes: Number of contour levels added, or number of new contour levels.

SV_APPROXNUMVALUES
Type: LgIndex_t
Arg Function: TecUtilArgListAppendInt()
Required: Yes
Notes: The approx number of new contour levels. Must be non-zero. The actual number will be adjusted slightly to give "nice" values of the contour variable at the levels. Use when SV_CONTOURLEVELACTION is set to ContourLevelAction_ResetToNice. Required for ContourLevelAction_ResetToNice.

SV_RAWDATA
Type: double *
Arg Function: TecUtilArgListAppendArray()
Required: Yes
Notes: A pointer to an aray containing the values of the contour variable at each of the added levels or at each of the new levels. Required for ContourLevelAction_Add and ContourLevelAction_New.

SV_RANGEMIN
Type: double
Arg Function: TecUtilArgListAppendDouble()
Default: 0.0
Required: No
Notes: The value of the contour variable at the minimum end of the range to be deleted, or the value of the contour variable near the level to be deleted. Use when SV_CONTOURLEVELACTION is set to ContourLevelAction_DeleteRange.

SV_RANGEMAX
Type: double
Arg Function: TecUtilArgListAppendDouble()
Default: 0.0
Required: No
Notes: The value of the contour variable at the maximum end of the range to be deleted. Use when SV_CONTOURLEVELACTION is set to ContourLevelAction_DeleteRange.


SV_CONTOURLEVELACTION
        SV_CONTOURLEVELACTION      Description
        ------------------------------------------------------------------------
        ContourLevelAction_Add     Add a new set of contour levels to the existing
                                   set of contour levels. You may specify the number
                                   of the contour group being modified (SV_CONTOURGROUP)
                                   and the number of contour levels being added
                                   (SV_ NUMVALUES). You must specify the value of the
                                   contour variable at each of the added levels
                                   (SV_RAWDATA).

        ContourLevelAction_New     Replace the current set of contour levels with a
                                   new set. You may specify the number of the
                                   contour group being modified (SV_CONTOURGROUP) and
                                   the number of contours levels in the new set
                                   (SV_NUMVALUES). You must specify the value of the
                                   contour variable at each of the new levels
                                   (SV_RAWDATA).

        ContourLevelAction_
        DeleteRange                Delete all contour levels between the specified
                                   minimum and maximum values of the contour variable
                                   (inclusive). You may specify the number of the
                                   contour group being modified (SV_CONTOURGROUP),
                                   the value of the contour variable at the minimum
                                   end of the range (SV_RANGEMIN), and the value of
                                   the contour variable at the maximum end of the
                                   range (SV_RANGEMAX).

        ContourLevelAction_Reset   Reset the contour levels to a set of evenly
                                   distributed values spanning the entire range of
                                   the currently selected contouring variable. You may
                                   specify the number of the contour group being
                                   modified (SV_CONTOURGROUP) and the number of
                                   contours levels in the new set (SV_NUMVALUES).

        ContourLevelAction_
        ResetToNice                Reset the contour levels to a set of evenly
                                   distributed values that approximately spans the
                                   range of the currently selected contouring variable.
                                   Exact range and number of levels will be adjusted
                                   to make contour levels have "nice" values. You
                                   may specify the number of the contour group being
                                   modified (SV_CONTOURGROUP) and the approximate
                                   number of contours levels in the new set
                                   (SV_APPROXNUMVALUES).

        ContourLevelAction_
        DeleteNearest              Delete the contour level with the value nearest
                                   the supplied value. You may specify the number of
                                   the contour group being modified (SV_CONTOURGROUP)
                                   and the value of the contour variable to be deleted
                                   (SV_RANGEMIN).

   
Returns:
TRUE if modification was successful, FALSE otherwise.
Precondition:
ArgList Argument list must be valid.

Must have one or more frames.

Current frame must have a data set with at least one zone.

Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilContourLevelX(ArgListPtr)
    POINTER (ArgListPtr, ArgList)

Python Syntax:

  Results = TecUtil.ContourLevelX(ArgList)

  Input:
                  ArgList              dictionary
  Output:
    Results[0]    ReturnVal            boolean

Add contour levels 0.1, 0.2, and 0.3 to the current set of contour levels for contour group 2:

   Boolean_t IsOk = TRUE;
   ArgList_pa ArgList;
   double levels[3] = {0.1, 0.2, 0.3};
   TecUtilLockStart(AddOnID);
   ArgList = TecUtilArgListAlloc();
   TecUtilArgListAppendInt(ArgList, SV_CONTOURLEVELACTION, (LgIndex_t) ContourLevelAction_Add);
   TecUtilArgListAppendInt(ArgList, SV_CONTOURGROUP, 2);
   TecUtilArgListAppendInt(ArgList, SV_NUMVALUES, 3);
   TecUtilArgListAppendArray(ArgList, SV_RAWDATA, (void *)levels);
   IsOk = TecUtilContourLevelX(ArgList);
   TecUtilArgListDealloc(&ArgList);
   TecUtilLockFinish(AddOnID);

SetValueReturnCode_e TecUtilContourSetVariable ( EntIndex_t  NewVariable  ) 

Assign which variable to use for contouring.

This function only operates on contour group 1. To operate on any contour group you must use TecUtilContourSetVariableX().

Parameters:
NewVariable Number of the variable to use.
Returns:
The setvalue return code (of type SetValueReturnCode_e).
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilContourSetVariable(NewVariable)
    INTEGER*4 NewVariable

Python Syntax:

  Results = TecUtil.ContourSetVariable(NewVariable)

  Input:
                  NewVariable          int
  Output:
    Results[0]    ReturnVal            SetValueReturnCode_e  (defined in TecVals.py)

To set the contour variable to be variable 3, use:

SetValueReturnCode_e TecUtilContourSetVariableX ( ArgList_pa  ArgList  ) 

Assign which variable to use for contouring a specific contour group.

Parameters:
ArgList Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions.

Arglist Values

SV_CONTOURGROUP
Type: SmInteger_t
Arg Function: TecUtilArgListAppendInt()
Required: Yes
Notes: Contour group to which the contour variable assignment applies. This value must be between 1 and 8

SV_VAR
Type: EntIndex_t
Arg Function: TecUtilArgListAppendInt()
Required: Yes
Notes: Variable number to assign as the contour variable for the specified group


Returns:
The setvalue return code (of type SetValueReturnCode_e).
Precondition:
ArgList Argument list must be valid.

Must have one or more frames.

Current frame must have a data set with at least one zone.

The active frame's plot plot type must be 2D or 3D.

Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilContourSetVariableX(ArgListPtr)
    POINTER (ArgListPtr, ArgList)

Python Syntax:

  Results = TecUtil.ContourSetVariableX(ArgList)

  Input:
                  ArgList              dictionary
  Output:
    Results[0]    ReturnVal            SetValueReturnCode_e  (defined in TecVals.py)

Set the contour variable of the second contour group to variable number 4:

   TecUtilLockStart(AddOnID);
   ArgList = TecUtilArgListAlloc();
   if (ArgList != NULL)
   {
      SetValueReturnCode_e SVRC;
      TecUtilArgListClear(ArgList);
      TecUtilArgListAppendInt(ArgList, SV_CONTOURGROUP, 2);
      TecUtilArgListAppendInt(ArgList, SV_VAR, 4);
      SVRC = TecUtilContourSetVariableX(ArgList);
      TecUtilArgListDealloc(&ArgList);
   }
   TecUtilLockFinish(AddOnID);

Boolean_t TecUtilQueryColorBandsInUseForContourGroup ( SmInteger_t  ContourGroup  ) 

Query to see if a color band is in use in the a contour group.

This function only applies to the current frame.

Parameters:
ContourGroup The contour group of interest and must be an integer between 1 and 8.
Returns:
TRUE if a color band is in use in the current frame for a contour group.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilQueryColorBandsInUseForContourGroup(
   &                   ContourGroup)
    INTEGER*4       ContourGroup

Python Syntax:

  Results = TecUtil.QueryColorBandsInUseForContourGroup(ContourGroup)

  Input:
                  ContourGroup         int
  Output:
    Results[0]    ReturnVal            boolean

Verify if a color band is in use for the contour group 3:

   Boolean_t IsOk;
   LgIndex_t NumLevels;
   double    *LevelValues;

   TecUtilLockStart(AddOnID);
   IsOk = ;
   if (TecUtilQueryColorBandsInUseForContourGroup(3))
     printf("There is a color bands in use for contour group #3\n");
   else
     printf("There are no color bands in use for contour group #3\n");


Generated on Tue Mar 12 02:24:40 2013 for Tecplot by  doxygen 1.5.5