Name: PGCONL Purpose: label contour map of a 2D data array Category: GRAPHICS File: pgplot.src Author: T.J. Pearson Use: see description below. Description: SUBROUTINE PGCONL (A, IDIM, JDIM, I1, I2, J1, J2, C, TR, 1 LABEL, INTVAL, MININT) INTEGER IDIM, JDIM, I1, J1, I2, J2, INTVAL, MININT REAL A(IDIM,JDIM), C, TR(6) CHARACTER*(*) LABEL Label a contour map drawn with routine PGCONT. Routine PGCONT should be called first to draw the contour lines, then this routine should be called to add the labels. Labels are written at intervals along the contour lines, centered on the contour lines with lettering aligned in the up-hill direction. Labels are opaque, so a part of the under- lying contour line is obscured by the label. Labels use the current attributes (character height, line width, color index, character font). The first 9 arguments are the same as those supplied to PGCONT, and should normally be identical to those used with PGCONT. Note that only one contour level can be specified; tolabel more contours, call PGCONL for each level. The Label is supplied as a character string in argument LABEL. The spacing of labels along the contour is specified by parameters INTVAL and MININT. The routine follows the contour through the array, counting the number of cells that the contour crosses. The first label will be written in the MININT'th cell, and additional labels will be written every INTVAL cells thereafter. A contour that crosses less than MININT cells will not be labelled. Some experimentation may be needed to get satisfactory results; a good place to start is INTVAL=20, MININT=10. Arguments: A (input) : data array. IDIM (input) : first dimension of A. JDIM (input) : second dimension of A. I1, I2 (input) : range of first index to be contoured (inclusive). J1, J2 (input) : range of second index to be contoured (inclusive). C (input) : the level of the contour to be labelled (one of the values given to PGCONT). TR (input) : array defining a transformation between the I,J grid of the array and the world coordinates. The world coordinates of the array point A(I,J) are given by: X = TR(1) + TR(2)*I + TR(3)*J Y = TR(4) + TR(5)*I + TR(6)*J Usually TR(3) and TR(5) are zero - unless the coordinate transformation involves a rotation or shear. LABEL (input) : character strings to be used to label the specified contour. Leading and trailing blank spaces are ignored. INTVAL (input) : spacing along the contour between labels, in grid cells. MININT (input) : contours that cross less than MININT cells will not be labelled. Updates: Oct 16, 1998: JPT automatically extracted from source.