I would like to apply a colormap to a bwlabel image representing max axis length extracted by imageprops (max axis <50) of objects min - max (0 - 50) value.
The idea would be that the colormap would display the range of values on the image rather than simply a pseudorandom shuffle of colors.
I'd also like to be able to display an accompanying histogram of the binary objects with the same colormap arrangement.
How might this be achieved? At the moment I have the following which displays the pseudorandom colors
labelmax = bwlabel(keeperMaxImage, 8);
MaxRGB = label2rgb(L,'hot',[.5 .5 .5], 'shuffle');
figure, imshow(MaxRGB), title('Max Axis length - color ramp denotes range of lengths');
figure, hist(M_axis, 100), title('Max');