I know I can set the tick direction to be pointing in our outside the plot box with
set(gca, 'TickDir', 'out')
I am trying to ONLY change the Xticks to point out but 'XTickDir' is not a property and I can't find anything in the docs about changing only 1 direction. Is it possible?

 採用された回答

Daniel M
Daniel M 2019 年 11 月 11 日

1 投票

You have to set the properties of the specific axis.
figure
plot(1:10)
ax = gca;
xax = ax.XAxis; % xax = get(ax,'XAxis');
set(xax,'TickDirection','out')

1 件のコメント

Erez
Erez 2019 年 11 月 11 日
Exactly what I was looking for. Thank you!

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

その他の回答 (0 件)

カテゴリ

製品

リリース

R2019a

質問済み:

2019 年 11 月 11 日

コメント済み:

2019 年 11 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by