Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Plot date labels
Date: Thu, 9 Aug 2012 18:06:17 +0000 (UTC)
Organization: GMO LLC
Lines: 7
Message-ID: <k00u6p$3hq$1@newscl01ah.mathworks.com>
References: <k00t34$t35$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1344535577 3642 172.30.248.45 (9 Aug 2012 18:06:17 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 9 Aug 2012 18:06:17 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2383542
Xref: news.mathworks.com comp.soft-sys.matlab:776079

"mklcst mklcst" wrote in message <k00t34$t35$1@newscl01ah.mathworks.com>...
> Hi everybody, I have a 2 column matrix to plot, one with the dates in number and the other column with the values. My problem is the date labels to plot on the x axis, because if I have 100obs I cannot print 100 date labels. In order to face it I tried with some loops but I have an inconsistency on the time range (same space interval different time period of months). I suppose there is an easy way to do it, so if I have a column-vector x with the dates in number and y with the values. What I have to do in order to plot it?

Providing your number-dates are Matlab datenums, just plot(x,y) as normal and then do:
datetick x   % or datetick('x') 

Alternatively, open the documentation with "doc" and search for something like "plot dates".