Hello,
I have two contourf plots (one plane at z=cte and another at y=cte) that have the same maximum temperature, 65.5ºC. When I "ask" matlab for the colorbar, I see that the maximum temperature on the right colorbar plot (y=cte) does not correspond to the true value.
Any ideas why is this happening and what is the best soluiton?
Thank you in advance.
Best regards, Simão

 채택된 답변

Walter Roberson
Walter Roberson 2015년 8월 26일

0 개 추천

Notice that the blob is mostly off-screen, either because the data is that way or because the ylimit has been set to not show all of it. It is plausible that in what is shown on the plot, the maximum never reaches the full 65.5.
You can use caxis() to control the maximum that colorbar will use.
After the first plot you could use
first_caxis = caxis();
and then after the second plot you could use
caxis(first_caxis);
before you call colorbar()

댓글 수: 1

Simao Nobrega
Simao Nobrega 2015년 8월 27일
Hello Walter Roberson,
Thank you for your answer. In fact, the temperatures are the same as it can be seen in the figures below (maximum temperature is 67.06ºC and not 65.5ºC as said). I still don't undersand why matlab is not giving me the maximum in the colorbar.
After all, your solution works fine for me. Thank you.
Best regards, Simão Nóbrega

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Contour Plots에 대해 자세히 알아보기

질문:

2015년 8월 26일

댓글:

2015년 8월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by