Help with colorbar in bidimensional plot

1 回表示 (過去 30 日間)
aurc89
aurc89 2014 年 9 月 8 日
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 件)

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by