class matplotlib.colors.BoundaryNorm(boundaries, ncolors, clip=False)
Generate a colormap index based on discrete intervals.
Mapping to the 0-1 interval could have been done via piece-wise linear interpolation, but using integers seems simpler, and reduces the number of conversions back and forth between integer and floating point.
boundaries defines the edges of bins, and data falling within a bin is mapped to the color with the same index.
If the number of bins doesn't equal ncolors, the color is chosen by linear interpolation of the bin number onto color numbers.
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.