MATLAB Answers

assign color to the colorbar

1 view (last 30 days)
Shahin sohrabi
Shahin sohrabi on 21 Aug 2020
Answered: Srivardhan Gadila on 23 Aug 2020
Hello,
I have two 2-D matrices that the first one has arrays between -20 to 35. I have a color figure for this first matrix. The other matrix has arrays between 5 to 16. For this second one,I want to have a color figure with the "same color "as the first one (for example both figure shows array 5 with blue) but the colorbar limits between 5 to 16. Does any one know how I can do this?
Thanks in advance.

  0 Comments

Sign in to comment.

Answers (1)

Srivardhan Gadila
Srivardhan Gadila on 23 Aug 2020
You can set same limits using caxis. Refer to the documentation of Control Colormap Limits & caxis.

  0 Comments

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!