<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using multiple colormaps in a single figure</title>
	<atom:link href="http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/</link>
	<description>&#60;a href=&#34;http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=1093599&#38;objectType=author&#34;&#62;Brett&#60;/a&#62; &#38; &#60;a href=&#34;http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=1094142&#38;objectType=author&#34;&#62;Jiro&#60;/a&#62; share favorite user-contributed submissions from the File Exchange.</description>
	<lastBuildDate>Fri, 10 Feb 2012 16:12:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Pascale</title>
		<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-14403</link>
		<dc:creator>Pascale</dc:creator>
		<pubDate>Wed, 25 Jan 2012 10:27:49 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-14403</guid>
		<description>Thanks a lot for this awesome code!</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this awesome code!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pedro</title>
		<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13759</link>
		<dc:creator>Pedro</dc:creator>
		<pubDate>Fri, 13 Aug 2010 01:11:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13759</guid>
		<description>Dear all, 

I would like to paint N cylinders, each cylinder [in the same figure] with its own color map, according to an intensity function. Is it possible to do it with these cool freeze functions? [In my plot, the cylinders are always identical even if they have different intensities]

thanks,

Pedro</description>
		<content:encoded><![CDATA[<p>Dear all, </p>
<p>I would like to paint N cylinders, each cylinder [in the same figure] with its own color map, according to an intensity function. Is it possible to do it with these cool freeze functions? [In my plot, the cylinders are always identical even if they have different intensities]</p>
<p>thanks,</p>
<p>Pedro</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brett</title>
		<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13555</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Fri, 14 May 2010 16:03:35 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13555</guid>
		<description>Cecilia,
If I recall correctly, John provided a way to do that:
&lt;pre class=&quot;code&quot;&gt;h=colorbar; freezeColors(h)&lt;/pre&gt;...or simply: freezeColors(colorbar).

Or, take a look at Carlos&#039;s very useful comment his CBFREEZE function, above.
Cheers,
Brett</description>
		<content:encoded><![CDATA[<p>Cecilia,<br />
If I recall correctly, John provided a way to do that:</p>
<pre class="code">h=colorbar; freezeColors(h)</pre>
<p>&#8230;or simply: freezeColors(colorbar).</p>
<p>Or, take a look at Carlos&#8217;s very useful comment his CBFREEZE function, above.<br />
Cheers,<br />
Brett</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cecilia Fleeger</title>
		<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13554</link>
		<dc:creator>Cecilia Fleeger</dc:creator>
		<pubDate>Fri, 14 May 2010 15:45:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13554</guid>
		<description>How to add colorbars for corresponding images in single figure window?</description>
		<content:encoded><![CDATA[<p>How to add colorbars for corresponding images in single figure window?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13414</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Mon, 01 Feb 2010 11:48:40 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13414</guid>
		<description>Very nice function, indeed, thanks for that. But why does&#039;t MATLAB freeze the colormaps for subplots automatically?</description>
		<content:encoded><![CDATA[<p>Very nice function, indeed, thanks for that. But why does&#8217;t MATLAB freeze the colormaps for subplots automatically?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor</title>
		<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13218</link>
		<dc:creator>Igor</dc:creator>
		<pubDate>Mon, 03 Aug 2009 20:50:18 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13218</guid>
		<description>Very useful and fit-to-practice solution. Thanks.</description>
		<content:encoded><![CDATA[<p>Very useful and fit-to-practice solution. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor</title>
		<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13217</link>
		<dc:creator>Igor</dc:creator>
		<pubDate>Mon, 03 Aug 2009 20:50:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13217</guid>
		<description>Very useful and fit-to-practice solution. Thanks.</description>
		<content:encoded><![CDATA[<p>Very useful and fit-to-practice solution. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Adrian Vargas Aguilera</title>
		<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13211</link>
		<dc:creator>Carlos Adrian Vargas Aguilera</dc:creator>
		<pubDate>Thu, 30 Jul 2009 20:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13211</guid>
		<description>Yes, this is a very useful contribution by John. By the way, to freeze the colorbar you can use my CBFREEZE:

&lt;pre&gt;
% DATA
load clown;
load penny.mat

% FIGURE
figure(&#039;color&#039;,&#039;w&#039;)

subplot(1,2,1)
image(X);
colormap(map);
cbfreeze   % --------------&gt; FREEZE COLORBAR
% Here&#039;s John&#039;s contribution:
freezeColors

subplot(1,2,2)
contour(P,15)
colormap(copper)
axis ij square
pcolor(P)
axis ij square
shading flat
colorbar
&lt;/pre&gt;


Download it here:
http://www.mathworks.com/matlabcentral/fileexchange/24371

Cheers, Carlos</description>
		<content:encoded><![CDATA[<p>Yes, this is a very useful contribution by John. By the way, to freeze the colorbar you can use my CBFREEZE:</p>
<pre>
% DATA
load clown;
load penny.mat

% FIGURE
figure('color','w')

subplot(1,2,1)
image(X);
colormap(map);
cbfreeze   % --------------&gt; FREEZE COLORBAR
% Here's John's contribution:
freezeColors

subplot(1,2,2)
contour(P,15)
colormap(copper)
axis ij square
pcolor(P)
axis ij square
shading flat
colorbar
</pre>
<p>Download it here:<br />
<a href="http://www.mathworks.com/matlabcentral/fileexchange/24371" rel="nofollow">http://www.mathworks.com/matlabcentral/fileexchange/24371</a></p>
<p>Cheers, Carlos</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jody  Klymak</title>
		<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13210</link>
		<dc:creator>Jody  Klymak</dc:creator>
		<pubDate>Thu, 30 Jul 2009 16:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13210</guid>
		<description>I love this entry too, and had my own kludges for years to make it happen, but Iverson&#039;s solution is much more elegant.  

It is unfortunate that this requires a workaround to include colorbars.  I actually don&#039;t understand the logic behind the new way the colorbar class is implemented.  I love how you can place the colorbars, but having them redraw everytime a new graphic element is added seems unnecessary.  

Of course all this fudging could be solved if colormaps were associated with axes rather than figures.  It really seems like a holdover from the days when graphics cards couldn&#039;t handle more than 256 colors.  Seems like a simple change that would be easily backwards compatible.</description>
		<content:encoded><![CDATA[<p>I love this entry too, and had my own kludges for years to make it happen, but Iverson&#8217;s solution is much more elegant.  </p>
<p>It is unfortunate that this requires a workaround to include colorbars.  I actually don&#8217;t understand the logic behind the new way the colorbar class is implemented.  I love how you can place the colorbars, but having them redraw everytime a new graphic element is added seems unnecessary.  </p>
<p>Of course all this fudging could be solved if colormaps were associated with axes rather than figures.  It really seems like a holdover from the days when graphics cards couldn&#8217;t handle more than 256 colors.  Seems like a simple change that would be easily backwards compatible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13209</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Wed, 29 Jul 2009 18:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/#comment-13209</guid>
		<description>I have used and like freezeColors. It might be worth noting that the trick that freezeColors uses is to convert the color values to rgb...that way the colormap of the figure no longer applies.  Once you know that, there are several tools to get multiple colormaps on the same figure or axes.  I like to use Oliver Woodford&#039;s FEX submission, SC (http://www.mathworks.com/matlabcentral/fileexchange/16233) to convert indexed images as well as cdata for surf plots into RGB. Here is a simple example:

&lt;pre&gt;
[x,y,z]=peaks(50);

zpos=z;
zpos(z&lt;=0)=NaN;
zrgb=sc(zpos,&#039;hot&#039;);

figure
sh(1)=surf(x,y,z);
hold on
sh(2)=surf(x,y,zpos,zrgb);
set(sh,&#039;edgecolor&#039;,&#039;none&#039;)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I have used and like freezeColors. It might be worth noting that the trick that freezeColors uses is to convert the color values to rgb&#8230;that way the colormap of the figure no longer applies.  Once you know that, there are several tools to get multiple colormaps on the same figure or axes.  I like to use Oliver Woodford&#8217;s FEX submission, SC (<a href="http://www.mathworks.com/matlabcentral/fileexchange/16233" rel="nofollow">http://www.mathworks.com/matlabcentral/fileexchange/16233</a>) to convert indexed images as well as cdata for surf plots into RGB. Here is a simple example:</p>
<pre>
[x,y,z]=peaks(50);

zpos=z;
zpos(z&lt;=0)=NaN;
zrgb=sc(zpos,'hot');

figure
sh(1)=surf(x,y,z);
hold on
sh(2)=surf(x,y,zpos,zrgb);
set(sh,'edgecolor','none')
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>

