I made a Heat map. I want to remove the x and y axis ticks. How is that possible?

47 ビュー (過去 30 日間)
Sattik Basu
Sattik Basu 2017 年 9 月 8 日
コメント済み: Din 2024 年 9 月 10 日
I tried using set(gca............), but that is for plot. i am stuck at this.
  2 件のコメント
Walter Roberson
Walter Roberson 2017 年 9 月 8 日
Is this the heatmap from the Bioinformations toolbox? https://www.mathworks.com/help/bioinfo/ref/heatmap.html
Or is it the new (R2017a) heatmap() that is for table objects?
Sattik Basu
Sattik Basu 2017 年 9 月 9 日
It is the new (R2017a) heatmap().

サインインしてコメントする。

回答 (3 件)

Walter Roberson
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 件のコメント
Image Analyst
Image Analyst 2017 年 9 月 10 日
Imshow has an 'InitialMagnification' setting.
FWDekker
FWDekker 2020 年 4 月 10 日
編集済み: FWDekker 2020 年 4 月 10 日
Thanks, Walter! Just a quick note: Calling xlabel or ylabel after doing this may bring back the ticks. Took me a while to figure out why your snippet didn't seem to be working.

サインインしてコメントする。


Jesús Bernardino Velázquez Fernández
編集済み: Walter Roberson 2023 年 8 月 22 日
h=heatmap(x,y,c);
s=struct(h);
s.XAxis.Visible='off';
s.YAxis.Visible='off';
  10 件のコメント
Din
Din 2024 年 9 月 10 日
I actually want a Y axis to have fewer number of values than the number of rows of the data. Plz lemme know if there is a way to do this?
Din
Din 2024 年 9 月 10 日
Also, when I save the figure, the original numbering (matching the dimensions of the data) overwrites the alternate numbering. Though, this problem can be solved by taking a screenshot of the figure, instead of saving it.

サインインしてコメントする。


Image Analyst
Image Analyst 2017 年 9 月 8 日
How about
axis off;
  1 件のコメント
Sattik Basu
Sattik Basu 2017 年 9 月 8 日
i tried this too. but i am getting the following error.
Error using axis (line 63) Using axis with heatmap is not supported.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeRed についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by