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!