MATLAB: How to code color bar in specific time colorbar Hi all I've plotted the attached figure, that I want to get the colorbar in dd/mm format any help is much appreciated. Thank you Best Answer You can manually correct colorbar valuesh = colorbar;s = datestr( linspace(7e5,7.5e5,10) , 'dd/mm/yyyy' );set(h,'YtickLabel',s) Related SolutionsMATLAB: Convert date to datetime t = datetime(DateStrings,'InputFormat','dd/MM/yyyy'); MATLAB: Bar plot Using my magic ball I will try to answer the question with one example made by me and based on the reference at the bottomfruit = [2 5 6 7]h=bar(fruit)l={'apples', 'oranges', 'strawberries', 'pears'}y=get(h,'Ydata');x=get(h,'Xdata');text(x-x(1)/3,y/2,l,'FontSize',18)Reference Related QuestionProduce a Date vector starting with a desired dateHow to convert a char into datetime variableHow to convert the format of a dateError Bars
Best Answer