フィルターのクリア

how to tick out yearly?

3 ビュー (過去 30 日間)
davit petraasya
davit petraasya 2016 年 5 月 6 日
コメント済み: davit petraasya 2016 年 5 月 6 日
Hi
Does anyone knows how to tick out yearly? I am using set(gca,'TickDir','out'); it is working but my ticks is appearing in every 10 years. I need ticks out yearly.
So how do I tick out yearly?
Thanks!

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 5 月 6 日
Look at this example
d=datenum('01-01-2015'):datenum('01-01-2035');
y=log(d);
plot(d,y)
a=datevec(d);
[ii,jj]=unique(a(:,1));
set(gca,'xtick',d(jj))
datetick('x','yyyy','keepticks')
  7 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2016 年 5 月 6 日
add to previous code
set(gca,'TickDir','out')
davit petraasya
davit petraasya 2016 年 5 月 6 日
Okay,great. Thanks Azzi.

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

その他の回答 (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