MATLAB: How to delimit the number of decimal places in a colorbar colorbar In this case, for example: contourf(peaks(60))colormap coolcolorbar('location','southoutside') i want 4 decimal places. thnks in adv, Best Answer contourf(peaks(60))colormap coolh=colorbar('location','southoutside');yt=get(h,'XTick');set(h,'XTickLabel',sprintf('%2.4f|',yt));Cheers! Related SolutionsMATLAB: Imagesc hide one axis If you are using R2015b or later (I think it is) then,ax = gca;imagesc(YourImage, 'Parent', ax);ax.YAxis.Visible = 'off'; MATLAB: How to add a colormap manually as x-axis under an histogram Call colorbar with the 'southoutside' location as shown in the "Add Horizontal Colorbar to Graph" example on the documentation page. Related QuestionHow to change the tick labels in a colorbarColorbar label beneath colorbarColorbar tick labels – set decimals placesHow to know which axes is associated to a colorbar in MATLAB R2013bDo colorbar limits not match the values specified by the CAXIS function in MATLAB 7.0 (R14) when using the CONTOUR or CONTOURF functionHow to make the ticks in the colorbar appear at the center of each color in MATLAB 7.0 (R14)
Best Answer