Help with colorbar in bidimensional plot
1 次查看(过去 30 天)
显示 更早的评论
Hello ! I have a problem with the colorbar: in this picture you can see a 2D map of a set of data called 'mat'
that I obtain with the following code
contourf(probe_frequency,pump_frequency,mat,10)
colormap(b2r(binf,bsup))
colorbar
where probe_frequency and pump_frequency are the horizontal and vertical axis, respectively, and binf and bsup are the minimum and maximum value of the data 'mat' that appear in this window, so that the colorbar is scaled according to these two values. By selecting a different window (e.g. between 580 and 650 in the horizontal axis and between 500 and 530 in the vertical axis), binf and bsup will be different, so the colorbar will change too:
What I want to do is to obtain a plot in a way that the minimum value corresponds to a 'bright' blue of the colorbar, and the maximum corresponds to a 'bright' red. On the contrary, in my plot the minimum value is close to zero, so the color is a weak blue close to the white. In this way, there is a lot of white space, and only a few colors in my figure. How can I solve this problem?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!