What I would like to do is shown in the figure below. How can I add this color ramp legend in a mapfile which will also be linked to a raster. I don't know how to get it working while drawing a figure based on that mapfile.
The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.
Did anyone find a solution about it? I need to display a legend from a mapfile serving a TIFF raster and the solution needs to be provided from the mapfile itself.