The function colormapTestImage creates a grayscale image matrix that is useful for evaluating the effectiveness of colormaps for visualizing sequential data. The image has two sections. One is a linear ramp with a superimposed small-amplitude sinusoid. This section makes it easy to visually inspect a colormap for perceptual nonuniformities. The other section is a full-range linear ramp. The function can also display a colormap visualization.
The test image is inspired by and adapted from the test image proposed in Peter Kovesi, "Good Colour Maps: How to Design Them," CoRR, 2015. https://arxiv.org/abs/1509.03700