NhlDataToNDC (datatondc)
Converts data units into normalized device coordinates (NDCs).
(See NhlDataToNDC.)
Two names are provided for this NCL procedure: the formal name is
NhlDataToNDC, and the abbreviated name is datatondc.
Synopsis
procedure NhlDataToNDC(
plot[1] : graphic,
x_in[*] : float,
y_in[*] : float,
x_out[*] : float,
y_out[*] : float
)
or
procedure datatondc(
plot[1] : graphic,
x_in[*] : float,
y_in[*] : float,
x_out[*] : float,
y_out[*] : float
)
Arguments
plot
HLU plot.
x_in
Single-dimensioned floating-point vector of x data coordinates.
y_in
Single-dimensioned floating-point vector of y data coordinates; must be
the same size as x_in.
x_out
Single-dimensioned floating-point vector the same size as x_in;
will contain x-coordinate output for datatondc.
y_out
Single-dimensioned floating-point vector the same size as x_out;
will contain y-coordinate output from datatondc.
Description
The NhlDataToNDC procedure uses the built-in transformation
mapping feature of HLU plot objects to map data coordinates into Normalized
Device Coordinates (screen coordinates). All four floating-point parameters must
have the same number of elements. NhlDataToNDC maps coordinate
pairs from x_in and y_in and places the results in the
corresponding elements of x_out and y_out respectively.
Both x_out and y_out can be the same variables as
x_in and y_in. When the data coordinates are outside of
the data transformation specified in the plot, a missing value is placed in
both of the corresponding indexes in the output arrays. The missing value
chosen is either the x_in missing value, y_in missing value,
or a system default.
Reference Manual Control Panel
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?
$Revision: 1.10 $ $Date: 1998/09/17 16:10:44 $