Path: news.mathworks.com!not-for-mail
From: "David Doria" <daviddoria@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: get colormap without generating a figure?
Date: Wed, 3 Oct 2007 12:35:41 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 45
Message-ID: <fe02at$klq$1@fred.mathworks.com>
References: <fducta$hm$1@fred.mathworks.com> <fduvee$ll6$1@fred.mathworks.com>
Reply-To: "David Doria" <daviddoria@gmail.com>
NNTP-Posting-Host: webapp-06-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1191414941 21178 172.30.248.36 (3 Oct 2007 12:35:41 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 3 Oct 2007 12:35:41 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1105197
Xref: news.mathworks.com comp.soft-sys.matlab:431155



I see.  I also didn't realize the "maps" were actually
functions, so I can do

a=jet; 

and then access the colors in order through a(N, :)

Thanks for the help!

David

"Steven Lord" <slord@mathworks.com> wrote in message
<fduvee$ll6$1@fred.mathworks.com>...
> 
> "David Doria" <daviddoria@gmail.com> wrote in message 
> news:fducta$hm$1@fred.mathworks.com...
> >I use this:
> >
> > map = colormap;
> >
> > but a blank figure is created.  Is there a way to stop that?
> 
> The COLORMAP function, called with that syntax, retrieves
the Colormap 
> property of the current figure.  If you do not have a
figure open, COLORMAP 
> will create one for you and return that figure's Colormap
property.  If you 
> don't want it to do this, make sure you have a figure open
when you call 
> COLORMAP.  Also, you should make sure that the
HandleVisible property of 
> your figure is set so that you can access the handle of
the current figure 
> from wherever you're calling COLORMAP.
> 
>
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure_props.html#HandleVisibility
> 
> -- 
> Steve Lord
> slord@mathworks.com 
> 
>