Path: news.mathworks.com!not-for-mail
From: "Lorenzo Guerrasio" <lorenzo.guerrasio@email.it>
Newsgroups: comp.soft-sys.matlab
Subject: Re: adjust colorbar axis in color plot
Date: Mon, 10 Aug 2009 13:22:17 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <h5p6u9$gj0$1@fred.mathworks.com>
References: <h5otem$3pe$1@fred.mathworks.com>
Reply-To: "Lorenzo Guerrasio" <lorenzo.guerrasio@email.it>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1249910537 16992 172.30.248.38 (10 Aug 2009 13:22:17 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 10 Aug 2009 13:22:17 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1371978
Xref: news.mathworks.com comp.soft-sys.matlab:562104


"Nachiketa " <nachiketaacharya@gmail.com> wrote in message <h5otem$3pe$1@fred.mathworks.com>...
> can anyone tell me how to specify how to specify the scale in the color-bar instead of the default-regular scale.
> 
> Ex:
> >>caxis([-500,500])
> 
>  then it gives -500,0,500
> 
> but I want to set axis like this, with different colors: 
> -500,-300,-150,-50,0,50,150,300,500
> 
> can anyone suggest me what should I use, which function...or anything that solves my problem....
> 
> 
> 
> Thanks in advance:-)


help colorbar
if it is a countor plot something like this
your_level_lst=[-500,-300,-150,-50,0,50,150,300,500];    [Cctrl,Hctrl]=contourf(Xg,Yg,dispersion,'levellistmode','manual','levellist',your_level_lst,'linestyle','-');