필터 지우기
필터 지우기

adding tics to the colorbar

조회 수: 3 (최근 30일)
peter
peter 2011년 3월 1일
I create temperature plots using the pcolor command. I know how to add lines for certain threshold levels to my plots but I also want mark these levels with tics and a character string on the colorbar.
Any suggestion how to do this is apreciated.
Thanks in advance, Peter

답변 (1개)

Paulo Silva
Paulo Silva 2011년 3월 1일
Here's a general example on how to do your own ticks
axes %create a figure with one axe
set(gca,'XLim',[0 100]) %change the x axe limit
xt=linspace(1,100,10) %make a vector starting on 1 and ending in 100 with 10 elements
set(gca,'XTick',xt) %set your own ticks from the vector xt
In your case you must do your own ticks vector from the data y you have, maybe something like you did with the threshold levels.
For the character string on the colorbar you can use the text function.

카테고리

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