MATLAB Answers

Rita
0

How I can fix the xlabel plot?

Asked by Rita
on 27 May 2016
Latest activity Commented on by Rita
on 30 May 2016
I have this plot
and I would like the x-axis start at Jan and end in Jan (1 whole year)I have used this
datetick('x','mmm','keepticks')
but the plot changed to this
which y axis does not start from zero and x axis start from april instead of Jan. How I can fix this?
Thanks for any comment.

  2 Comments

Could you show us
get(gca,'xtick')
?
Rita
on 30 May 2016
Sorry Walter, I attached the plots .

Sign in to comment.

1 Answer

Answer by the cyclist
on 30 May 2016
 Accepted Answer

I can't say for sure without knowing the answer to Walter's question, but try this:
datetick('x','mmm','keepticks','keeplimits')

  1 Comment

Rita
on 30 May 2016
Thanks The cyclist.

Sign in to comment.