spineScoreMap
The colormap used for SPINE scores.
Pale at score 0 and deep at score 1, monotone in lightness, built from Okabe-Ito anchors so it stays readable in greyscale and to colour-blind readers. The typical bulk recedes and the atypical objects stand out.
spineDataPlot and spineNetworkPlot apply it for you. Use this directly only when drawing your own figure.
Syntax
help spineScoreMap
SPINE Score Map
Sequential colormap for SPINE scores.
cmap = spineScoreMap 256 colours
cmap = spineScoreMap(n) n colours
Pale at score 0 and deep at score 1, monotone in lightness, built from
Okabe-Ito anchors so that it stays readable in greyscale and to colour-blind
readers. The typical bulk recedes and the atypical objects stand out.
Uses base MATLAB only.
Author
Abd AlRahman AlMomani
Assistant Professor of Data Science and Mathematics, ERAU, AZ
almomaniar@gmail.com
Using it on your own axes
Fix the colour limits at 0 to 1, as the package's own figures do, so two pictures can be compared by eye.
D = [randn(200,2); [12 12] + 0.25*randn(20,2)];
[s, ~] = spine(D, 'dist2median', "upper");
scatter(D(:,1), D(:,2), 30 + 60*s, s, 'filled', 'MarkerEdgeColor', [0.3 0.3 0.3]);
colormap(spineScoreMap); clim([0 1]); colorbar; axis equal
title('drawn by hand, coloured by score');
The ramp itself
disp(round(c, 3))
0.9730 0.9690 0.8820
0.9580 0.9460 0.5160
0.9410 0.8940 0.2590
0.9230 0.7770 0.0840
0.9020 0.6240 0
0.8770 0.4930 0
0.8350 0.3690 0
0.6640 0.2550 0.0100
0.3490 0.1490 0.0310
Monotone in lightness
Pale at zero and deep at one, so the ordering survives a greyscale print.
lum = spineScoreMap * [0.2126; 0.7152; 0.0722];
fprintf('luminance at score 0: %.3f, at score 1: %.3f\n', lum(1), lum(end));
luminance at score 0: 0.964, at score 1: 0.183
See also
spineDataPlot, spineNetworkPlot.