필터 지우기
필터 지우기

Help with colorbar in bidimensional plot

조회 수: 2 (최근 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 CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by