MATLAB: Scaling the colorbar of the plot codecolorbar I want to scale the color bar to maximum and minimum values? which function should I use caxis or clim? and what is the difference between them Best Answer set(gca,'ylim',[min_yval max_yval]), %for y axis Related SolutionsMATLAB: Colorbar not matching colormap colormap is a function and you just blew it away with this line of code:colormap = jet(256);That overwrote the colormap function (luckily not permanently) with a 256-by-3 double array.Try it this waycolormap(jet(256)); MATLAB: How to create a logarithmic colorscale on a scatter3 colorbar in version 2016a In R2016a, you cancb = colorbar;cb.DataSpace.YScale = 'log';However, this will be ignored and it will retain linear.... and that is the only control you have in R2016a, other than creating your own color bar similar to the way it was done in HG1: create an axes and draw an image (or patch) in it. Related QuestionLogarithmic scale for colorbarColorbar
Best Answer