I made a Heat map. I want to remove the x and y axis ticks. How is that possible?
조회 수: 28 (최근 30일)
이전 댓글 표시
I tried using set(gca............), but that is for plot. i am stuck at this.
댓글 수: 2
Walter Roberson
2017년 9월 8일
Is this the heatmap from the Bioinformations toolbox? https://www.mathworks.com/help/bioinfo/ref/heatmap.html
답변 (3개)
Walter Roberson
2017년 9월 9일
There are no x and y axis ticks for the new R2017a heatmap object. There is at most the ticks inside the colorbar beside the drawing. Is it the colorbar tick marks that you want to remove?
댓글 수: 10
Jesús Bernardino Velázquez Fernández
2023년 8월 22일
편집: Walter Roberson
2023년 8월 22일
h=heatmap(x,y,c);
s=struct(h);
s.XAxis.Visible='off';
s.YAxis.Visible='off';
댓글 수: 2
Walter Roberson
2023년 8월 22일
Demonstration:
load patients
tbl = table(LastName,Age,Gender,SelfAssessedHealthStatus,...
Smoker,Weight,Location);
h = heatmap(tbl,'Smoker','SelfAssessedHealthStatus');
s=struct(h);
s.XAxis.Visible='off';
s.YAxis.Visible='off';
Walter Roberson
2023년 8월 22일
편집: Walter Roberson
2023년 8월 22일
Note this removes the x and y axes labels as well as the ticks.
The original poster had hoped https://www.mathworks.com/matlabcentral/answers/355809-i-made-a-heat-map-i-want-to-remove-the-x-and-y-axis-ticks-how-is-that-possible#comment_483043 to get rid of the numbers as well, just showing the colors.
참고 항목
카테고리
Help Center 및 File Exchange에서 Colormaps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!