Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: coloring contour plot
Date: Mon, 10 Aug 2009 21:55:22 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 49
Message-ID: <h5q50a$ps3$1@fred.mathworks.com>
References: <h5ovhi$jug$1@fred.mathworks.com> <h5p776$8pl$1@fred.mathworks.com> <h5p9i7$9gc$1@fred.mathworks.com> <h5pb13$nnp$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 1249941322 26499 172.30.248.37 (10 Aug 2009 21:55:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 10 Aug 2009 21:55:22 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1653683
Xref: news.mathworks.com comp.soft-sys.matlab:562239


Thanks Lorenzo Guerrasio,

This is my solution for this moment:
[C,h]=contourf(X,Y,Z);
clabel(C,h,'FontSize',20,'Rotation',0);
caxis([0.5 1])
colormap gray

I think this is not a good solution but it work. What I done, after run the program I reverse the colormap manual. So I get what I want.

If anybody now how to reverse the colormap gray, let me know.

Any way, thanks for everybody.

Regards

Bahari

"Lorenzo Guerrasio" <lorenzo.guerrasio@email.it> wrote in message <h5pb13$nnp$1@fred.mathworks.com>...
> there should be several example in help colormap.
> 
> "Bahari " <baid69@yahoo.co.uk> wrote in message <h5p9i7$9gc$1@fred.mathworks.com>...
> > Thanks a lot, could you pls give an example to create my own colormap. If I can reverse the colormap gray, I think, a little bit I can solve my problem.
> > 
> > Another things, I found this from matlab Help: 
> > "[C,h,CF] = contourf(...) returns the contour matrix C as calculated by the function contourc and used by clabel, a vector of handles h to patch graphics objects (instead of a contourgroup object, for compatibility with MATLAB Version 6.5 and earlier) and a contour matrix CF for the filled areas."
> > 
> > I think this command can help me to solve my problem but  how to use this "[C,h,CF] = contourf(...)" I'm not so understand. Any one can help?
> > 
> > Regards
> > 
> > Bahari
> > 
> > 
> > "Lorenzo Guerrasio" <lorenzo.guerrasio@email.it> wrote in message <h5p776$8pl$1@fred.mathworks.com>...
> > > You could simply create your colormap and than load it everytime you make a figure.
> > > 
> > > "Bahari " <baid69@yahoo.co.uk> wrote in message <h5ovhi$jug$1@fred.mathworks.com>...
> > > > Dear All,
> > > > I want to color my contour base on value of Z, if Z<=1 the color will be white and if Z>1 the color will be light gray. 
> > > > I succeed to plot the contour with the label as command below but still not success to coloring it.
> > > > 
> > > > [C,h]=contour(X,Y,Z);
> > > > clabel(C,h,'FontSize',10,'Rotation',0);
> > > > colormap gray
> > > > 
> > > > Thanks in advance for help.
> > > > 
> > > > Bahari