[Top] [Prev] [Next] [Bottom]

8.13 Scale variables to a palette: bytscl, split_bytscl

Calling Sequence

bytscl(z, top=max_byte, cmin=lower_cutoff,
cmax=upper_cutoff)
split_bytscl (x, upper, cmin = None, cmax = None)

Description

bytscl returns an unsigned char array (Python typecode "b")of the same shape as Z, with values linearly scaled to the range 0 to one less than the current palette size. If MAX_BYTE is specified, then the scaled values will run from 0 to MAX_BYTE instead. If LOWER_CUTOFF and/or UPPER_CUTOFF are specified, Z values outside this range are mapped to the cutoff value; otherwise the linear scaling maps the extreme values of Z to 0 and MAX_BYTE.

split_bytscl is as the bytscl function, but scales to the lower half of a split palette (0-99, normally the color scale) if the second parameter is zero or nil, or the upper half (100-199, normally the gray scale) if the second parameter is non-zero.



[Top] [Prev] [Next] [Bottom]

support@icf.llnl.gov
Copyright © 1997,Regents of the University of California. All rights reserved.