Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Axes ticks irregular spacing
Date: Mon, 29 Jun 2009 11:59:03 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 16
Message-ID: <h2aaa6$8sh$1@fred.mathworks.com>
References: <h2a9ut$dmc$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246276743 9105 172.30.248.37 (29 Jun 2009 11:59:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 29 Jun 2009 11:59:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:551370


"dage Tarari" <ahsghd@hjg.es> wrote in message <h2a9ut$dmc$1@fred.mathworks.com>...
> Hi all,
> 
> I wonder if it is possible to create X axis ticks with non-monotonically increasing values. Example: if the x-axis represents time and we want to locate one tick for the first day of every month, the spacing will be 28 and 31 between 01 Feb, 01 Mar and 01 Apr, respectively.
> 
> Thanks!!
> Belen

one of the solutions is outlined below

     plot(1:10);
     set(gca,...
          'xtick',[1,2,pi,2*pi,9],...
          'xticklabel',{'1','2','pi','2pi','9Hz'});

us