change xticklabel and datetick

3 Ansichten (letzte 30 Tage)
suyun
suyun am 7 Nov. 2012
Bearbeitet: suyun am 23 Dez. 2014
I changed xticklabel.
set(gca,'xlim',[0 69], 'ylim', [-8 8]);
set(gca,'XTickLabel',734460:734528)
datetick(x,'mm/dd','keepticks')
xtick is 11/18, 11/19...but I hope xtick format is 01/01, 01/02....(month/day)

Antworten (1)

Walter Roberson
Walter Roberson am 7 Nov. 2012
You will have to tell plot to use 734460:734528 as your x values. For example,
plot(734460:734528, y)
instead of
plot(y)
Once you have done that, you can do the datetick()

Kategorien

Mehr zu Axes Appearance finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by