フィルターのクリア

removing tickmarks on image in MatLab2014a

1 回表示 (過去 30 日間)
Laszlo Bodnar
Laszlo Bodnar 2016 年 2 月 26 日
コメント済み: Laszlo Bodnar 2016 年 2 月 26 日
I have created an image using the following code:
smallmatrix_6partic=[0 1 0 0 0 0 ; 0 0 0 0 0 0 ; 0 1 0 0 0 0 ; 0 1 0 0 0 0; 0 0 0 1 0 0; 0 0 0 0 1 0];
smallmatrix_colheading= {'A','B','C','D','E','F'};
[rows,cols]=size(smallmatrix_6partic);
imagesc(smallmatrix_6partic)
set(gca,'Xtick',1:rows,'XTickLabel',smallmatrix_colheading)
set(gca,'Ytick',1:rows,'YTickLabel',smallmatrix_colheading)
Is it possible to remove the little vertical thin black tick marks on X-axis and the little horizontal think black tick marks on Y-axis? Simultaneously, I want to keep the labels ('A', 'B', 'C' etc.) themselves. I tried the following code but this one completely erases the X-labels, too.
set(gca,'xtick',[],'ytick',[])

採用された回答

Ralf
Ralf 2016 年 2 月 26 日
Is that doing the Job for you?
set(gca,'TickLength', [0 0])
  1 件のコメント
Laszlo Bodnar
Laszlo Bodnar 2016 年 2 月 26 日
Absolutely, yes, perfect! Thank you!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGrid Lines, Tick Values, and Labels についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by