<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168618</link>
    <title>MATLAB Central Newsreader - Color regions of plot background</title>
    <description>Feed for thread: Color regions of plot background</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 02 May 2008 12:23:03 -0400</pubDate>
      <title>Color regions of plot background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168618#429910</link>
      <author>David Doria</author>
      <description>Is there a ways to set the color of the plot background over&lt;br&gt;
particular intervals&lt;br&gt;
&lt;br&gt;
say i want the background on [0,1] red and [1,2] blue&lt;br&gt;
&lt;br&gt;
is this possible?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Dave</description>
    </item>
    <item>
      <pubDate>Fri, 02 May 2008 13:19:43 -0400</pubDate>
      <title>Re: Color regions of plot background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168618#429925</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fvf137$njj$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
David Doria &amp;lt;daviddoria@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;Is there a ways to set the color of the plot background over&lt;br&gt;
&amp;gt;particular intervals&lt;br&gt;
&lt;br&gt;
&amp;gt;say i want the background on [0,1] red and [1,2] blue&lt;br&gt;
&lt;br&gt;
&amp;gt;is this possible?&lt;br&gt;
&lt;br&gt;
No. There is only one plot background color.&lt;br&gt;
&lt;br&gt;
What you can do, though, is create patch() objects in the areas you&lt;br&gt;
want, and set the patch FaceColor to the color you want, and&lt;br&gt;
set the patch EdgeColor to 'none'. You might have to play&lt;br&gt;
with the patch alpha transparency parameters or the z coordinate of&lt;br&gt;
the patch to get the plot lines to appear &quot;above&quot; the background&lt;br&gt;
colors.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;Ignorance has been our king... he sits unchallenged on the throne of&lt;br&gt;
&amp;nbsp;&amp;nbsp;Man. His dynasty is age-old. His right to rule is now considered&lt;br&gt;
&amp;nbsp;&amp;nbsp;legitimate. Past sages have affirmed it. They did nothing to unseat&lt;br&gt;
&amp;nbsp;&amp;nbsp;him.&quot;                                       -- Walter M Miller, Jr</description>
    </item>
    <item>
      <pubDate>Fri, 02 May 2008 16:34:04 -0400</pubDate>
      <title>Re: Color regions of plot background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168618#429968</link>
      <author>Scott Burnside</author>
      <description>&amp;gt; snip&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;is this possible?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; No. There is only one plot background color.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; snip&lt;br&gt;
&lt;br&gt;
Nonsense...&lt;br&gt;
&lt;br&gt;
img = zeros(10,10,3);&lt;br&gt;
img(1:5,:,1) = 0;&lt;br&gt;
img(1:5,:,2) = 1;&lt;br&gt;
img(1:5,:,3) = 0;&lt;br&gt;
img(6:10,:,1) = 0;&lt;br&gt;
img(6:10,:,2) = 0;&lt;br&gt;
img(6:10,:,3) = 1;&lt;br&gt;
&lt;br&gt;
imagesc(img)&lt;br&gt;
hold on&lt;br&gt;
axis off&lt;br&gt;
x = 1:10;&lt;br&gt;
y = sin(x)+ x;&lt;br&gt;
plot(x,y,'-k','markersize',14);&lt;br&gt;
hold on&lt;br&gt;
&lt;br&gt;
Scott</description>
    </item>
  </channel>
</rss>

