A routine is available in PLPLOT which performs a contour plot of data stored in a two-dimensional array. A contour following algorithm is used, so that it is possible to use non-continuous line styles.
The routine <#1094#>plcont<#1094#> (page #plcont#1095>
The path of each contour is initially computed in terms of the values of the
array indicies which range from 1 to <#1009#>nx<#1009#> in the first index and from
1 to <#1010#>ny<#1010#> in the second index. Before these can be drawn in the current
window (see page #window#1011>
Often, the transformation between array indicies and world coordinates can
be expressed as a linear transformation. A routine is provided within the
library which can be passed to <#1020#>plcont<#1020#> as the parameter <#1021#>tr<#1021#>. This
transformation routine is as follows:
As an example in setting up <#1025#>tr[]<#1025#>, suppose that the array <#1026#>z<#1026#>
is of size
where <#999#>z<#999#> is the two-dimensional array of size
where <#1018#>(x,y)<#1018#>
is the point through which the contour runs expressed in
terms of array indicies, and <#1019#>(tx,ty)<#1019#> are pointers to float variables
which are the world coordinates of
the point which corresponds to these indicies.
Thus by setting up the values in the array <#1024#>tr[]<#1024#>, we can
apply an arbitrary translation, rotation and/or shear to the array before
drawing out the contours. By defining other transformation subroutines,
it is possible to draw contours wrapped around polar grids etc.
tx
;SPMnbsp;=;SPMnbsp;
ty
;SPMnbsp;=;SPMnbsp;