Applies a color map to an ndarray.
var imshow = require("ndarray-imshow")
var colorize = require("apply-colormap")
var fill = require("ndarray-fill")
var zeros = require("zeros")
var x = zeros([512, 512])
fill(x, function(a,b) {
return a*a + b*b
})
imshow(colorize(x))
npm install apply-colormap
Applies a colormap to an ndarray
-
array
is an ndarray -
options
is an object containing a list of properties to apply to the arraycolormap
determines the colormap to use (default "jet"). Names are consistent with thecolormap
package.min
determines the lowest color in the imagemax
determines the highest color in the imageoutBuffer
is an optional buffer into which the output is written
Returns An ndarray representing the colorized image or volume
(c) 2014 Mikola Lysenko. MIT License