GINO Graphics Suite - GINOGRAF v9.5  

ggAddVectors

Syntax

[C/C++:]
void ggAddVectors(int nx, int ny, GVECTOR *vectors, int head);
[F90:]
subroutine ggAddVectors(nx, ny, vectors, head)

type(GVECTOR), intent(in) :: vectors(nx, ny)
integer, intent(in) :: nx, ny, head

Arguments

nx
Number of vectors in the X direction

ny
Number of vectors in the Y direction

vectors
Two dimensional array of dimension nx,ny containing the directions, strengths and colours of each vector

head
Type of arrowhead drawn at each vector

= GCLOSED Arrowhead closed (drawn as a triangle)
= GSOLID Arrowhead filled using colour vectors.col
= GOPEN Arrowhead open (drawn with two lines only)

Description

The routine ggAddVectors() draws a Vector Chart consisting of a grid of nx times ny arrows; each arrow having an individual strength, direction, and colour attribute determined by the corresponding values within the components vectors.stren, vectors.direc, and vectors.col respectively. The directions (in vectors.direc) are measured anticlockwise from the three o'clock (positive X axis) position.

No axes are drawn with this routine but the Vector Chart is mapped onto the area defined by the intersection of the current graphical axes as set up by the routines ggSetAxesPos() and ggSetAxesScaling() (or their defaults). The axes ranges and number of tick marks should be set appropriately for the Vector Chart data being displayed. The Vector Chart may be mapped onto a different area of the current axes system by using the routine ggSetVectorChartFrame().

The vectors are displayed as equally spaced arrows. The length of the arrows is linearly proportional to the strength values in vectors.stren and scaled using the current settings defined using ggSetVectorAttribs(). Arrows are not drawn if their strength is zero or if it lies outside the clipping limits defined by ggSetVectorLimits(). The arrows point in the corresponding directions held in the component vectors.direc (or that +180  if the strength is negative) and are displayed in the colour of the corresponding colour values held in vectors.col.

Three types of arrowhead, determined by the value of head, are available. If the type is out of range, a warning message is output and the default is used.

See Also

ggAddVectors Usage
ggSetAxesPos
ggSetAxesScaling
ggSetVectorChartFrame
ggSetVectorLimits
ggSetVectorAttribs