matplotlib.colors.makeMappingArray(N, data, gamma=1.0)
[source]
Create an N -element 1-d lookup table.
This assumes a mapping \(f : [0, 1] \rightarrow [0, 1]\). The returned data is an array of N values \(y = f(x)\) where x is sampled from [0, 1].
By default (gamma = 1) x is equidistantly sampled from [0, 1]. The gamma correction factor \(\gamma\) distorts this equidistant sampling by \(x \rightarrow x^\gamma\).
Parameters: |
|
---|---|
Returns: |
|
This function is internally used for LinearSegmentedColormaps
.
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.colors.makeMappingArray.html