フィルターのクリア

slight repositioning of X-axis labels in MatLab2014a

1 回表示 (過去 30 日間)
Laszlo Bodnar
Laszlo Bodnar 2016 年 2 月 26 日
回答済み: Walter Roberson 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)
I would slightly like to change the position of X labels ('A', 'B', 'C' etc.), by moving them to the right (say by 2-3 millimetres). Is there a proper way to calibrate this?

採用された回答

Walter Roberson
Walter Roberson 2016 年 2 月 26 日
No, not in R2014a. You could add spaces at the beginning of your labels, but you are fighting against variable width fonts and it can be difficult to use precise spacing. In R2014a and before when you need better control of labels, the method is to not use labels at all and to instead text() what you want into place.
R2014b and later changes how labels are handled.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by