Logarithmic color scale in 2d histogram

조회 수: 8 (최근 30일)
sam ira
sam ira 2018년 10월 8일
댓글: ANKUR KUMAR 2018년 10월 8일
I am looking for a way to change the colorbar of a 2d histogram plotted with DisplayStyle = 'tile' to a logarithmic scale so that one can better distinguish the frequencies. Unfortunally histogram2 has no property 'ColorScale'. Thanks in advance!

답변 (1개)

ANKUR KUMAR
ANKUR KUMAR 2018년 10월 8일
Use ruler.scale to set log axis in colorbar.
contourf(randi(1000,25,25))
cx= colorbar();
cx.Ruler.Scale = 'log';
cx.Ruler.MinorTick = 'on';
  댓글 수: 2
sam ira
sam ira 2018년 10월 8일
편집: sam ira 2018년 10월 8일
I already tried this but got a
Warning: Error updating ColorBar
DataSpace or ColorSpace transform method failed
ANKUR KUMAR
ANKUR KUMAR 2018년 10월 8일
Please attach you code along with the .mat file containing required variables.

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

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by