MATLAB: How to make a thermometer-style graph

barbar plotcolorcolorbarfiguregraphgraphicsMATLABplottemperaturethermometer

Hi,
I would like to make a graph that basically is one single vertical bar. I would like to input temperature values and then display them as horizontal lines on said bar. Finally, I would like to give different intervalls on the bar custom colors.
How can I do this? I can't seem to find a solution in the documentation
Thanks in advance!

Best Answer

Have you tried
bar(y,'stacked')