<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162720</link>
    <title>MATLAB Central Newsreader - Adding New Axes Object to a Figure</title>
    <description>Feed for thread: Adding New Axes Object to a Figure</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The 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>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 29 Jan 2008 16:32:05 -0500</pubDate>
      <title>Re: Adding New Axes Object to a Figure</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162720#411800</link>
      <author>jk Wang</author>
      <description>Got it! Thank you~ &lt;br&gt;
&lt;br&gt;
JK Wang&lt;br&gt;
&lt;br&gt;
roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
message &amp;lt;fnl1nd$oc4$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&amp;gt; In article &amp;lt;fnkubm$l0k$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;gt; jk Wang &amp;lt;wjk1984@gmail.com&amp;gt; top-posted:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Please do not post your reply above the text you are&lt;br&gt;
replying to:&lt;br&gt;
&amp;gt; it makes it difficult to hold a conversation.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
&amp;gt; &amp;gt;message &amp;lt;fnjmjk$34v$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; In article &amp;lt;fnjgsl$g4q$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; jk Wang &amp;lt;wjk1984@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;I want to write a program that can adding new axes, but &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;without changing the other axes existing on the&lt;br&gt;
figure. All &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;of these axes display different images. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;So how can I keep the former axes (and their images) &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;unchanged while adding a new one? Help me please~ &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Just do it. The axes() function does not clear the figure.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;I thought axes() won't change previous axes objects, but&lt;br&gt;
&amp;gt; &amp;gt;when I tried the following codes, the image displayed were&lt;br&gt;
&amp;gt; &amp;gt;cleared by an new axes.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;Here's my code,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;figure; &lt;br&gt;
&amp;gt; &amp;gt;h1 = gcf;&lt;br&gt;
&amp;gt; &amp;gt;axes(h1)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; That should be axes('Parent',h1);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;imshow(imread('lego08.gif')) %display an image&lt;br&gt;
&amp;gt; &amp;gt;figure(h1);axes              %create another axes.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; That does not clear the existing axes or image. Instead, it is&lt;br&gt;
&amp;gt; putting the new axis right on top of the old one, as you&lt;br&gt;
did not&lt;br&gt;
&amp;gt; specify a position or size for the new axis. If you look&lt;br&gt;
closely,&lt;br&gt;
&amp;gt; you will probably notice that the x and y axis labels are&lt;br&gt;
doubled,&lt;br&gt;
&amp;gt; two sets of labels in the same area.&lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt;   "I will speculate that [...] applications [...] could&lt;br&gt;
actually see a&lt;br&gt;
&amp;gt;   performance boost for most users by going dual-core&lt;br&gt;
[...] because it&lt;br&gt;
&amp;gt;   is running the adware and spyware that [...] are&lt;br&gt;
otherwise slowing&lt;br&gt;
&amp;gt;   down the single CPU that user has today"           --&lt;br&gt;
Herb Sutter&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 28 Jan 2008 17:00:29 -0500</pubDate>
      <title>Re: Adding New Axes Object to a Figure</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162720#411629</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fnkubm$l0k$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
jk Wang &amp;lt;wjk1984@gmail.com&amp;gt; top-posted:&lt;br&gt;
&lt;br&gt;
Please do not post your reply above the text you are replying to:&lt;br&gt;
it makes it difficult to hold a conversation.&lt;br&gt;
&lt;br&gt;
&amp;gt;roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
&amp;gt;message &amp;lt;fnjmjk$34v$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; In article &amp;lt;fnjgsl$g4q$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;gt;&amp;gt; jk Wang &amp;lt;wjk1984@gmail.com&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;I want to write a program that can adding new axes, but &lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;without changing the other axes existing on the figure. All &lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;of these axes display different images. &lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;So how can I keep the former axes (and their images) &lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;unchanged while adding a new one? Help me please~ &lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; Just do it. The axes() function does not clear the figure.&lt;br&gt;
&lt;br&gt;
&amp;gt;I thought axes() won't change previous axes objects, but&lt;br&gt;
&amp;gt;when I tried the following codes, the image displayed were&lt;br&gt;
&amp;gt;cleared by an new axes.&lt;br&gt;
&lt;br&gt;
&amp;gt;Here's my code,&lt;br&gt;
&lt;br&gt;
&amp;gt;figure; &lt;br&gt;
&amp;gt;h1 = gcf;&lt;br&gt;
&amp;gt;axes(h1)&lt;br&gt;
&lt;br&gt;
That should be axes('Parent',h1);&lt;br&gt;
&lt;br&gt;
&amp;gt;imshow(imread('lego08.gif')) %display an image&lt;br&gt;
&amp;gt;figure(h1);axes              %create another axes.&lt;br&gt;
&lt;br&gt;
That does not clear the existing axes or image. Instead, it is&lt;br&gt;
putting the new axis right on top of the old one, as you did not&lt;br&gt;
specify a position or size for the new axis. If you look closely,&lt;br&gt;
you will probably notice that the x and y axis labels are doubled,&lt;br&gt;
two sets of labels in the same area.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;"I will speculate that [...] applications [...] could actually see a&lt;br&gt;
&amp;nbsp;&amp;nbsp;performance boost for most users by going dual-core [...] because it&lt;br&gt;
&amp;nbsp;&amp;nbsp;is running the adware and spyware that [...] are otherwise slowing&lt;br&gt;
&amp;nbsp;&amp;nbsp;down the single CPU that user has today"           -- Herb Sutter&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 28 Jan 2008 16:15:03 -0500</pubDate>
      <title>Re: Adding New Axes Object to a Figure</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162720#411620</link>
      <author>Vihang Patil</author>
      <description>&lt;br&gt;
&lt;br&gt;
&amp;lt;I want to write a program that can adding new axes, but &lt;br&gt;
without changing the other axes existing on the figure. &amp;gt;&lt;br&gt;
&lt;br&gt;
You probably would need subplot&lt;br&gt;
doc subplot&lt;br&gt;
HTH&lt;br&gt;
Vihang&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 28 Jan 2008 16:03:02 -0500</pubDate>
      <title>Re: Adding New Axes Object to a Figure</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162720#411617</link>
      <author>jk Wang</author>
      <description>Hi, George&lt;br&gt;
&lt;br&gt;
I thought axes() won't change previous axes objects, but&lt;br&gt;
when I tried the following codes, the image displayed were&lt;br&gt;
cleared by an new axes.&lt;br&gt;
&lt;br&gt;
Here's my code,&lt;br&gt;
&amp;nbsp;&lt;br&gt;
figure; &lt;br&gt;
h1 = gcf;&lt;br&gt;
axes(h1)&lt;br&gt;
imshow(imread('lego08.gif')) %display an image&lt;br&gt;
figure(h1);axes              %create another axes.&lt;br&gt;
&lt;br&gt;
By the way, if there's no way to add axes without affecting&lt;br&gt;
previous axes objects. Is it possible to display multiple&lt;br&gt;
images on the same axes without overlapping?&lt;br&gt;
&lt;br&gt;
Thanks!&lt;br&gt;
&lt;br&gt;
JK Wang&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
message &amp;lt;fnjmjk$34v$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&amp;gt; In article &amp;lt;fnjgsl$g4q$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;gt; jk Wang &amp;lt;wjk1984@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;I want to write a program that can adding new axes, but &lt;br&gt;
&amp;gt; &amp;gt;without changing the other axes existing on the figure. All &lt;br&gt;
&amp;gt; &amp;gt;of these axes display different images. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;So how can I keep the former axes (and their images) &lt;br&gt;
&amp;gt; &amp;gt;unchanged while adding a new one? Help me please~ &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Just do it. The axes() function does not clear the figure.&lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt;   "There are some ideas so wrong that only a very&lt;br&gt;
intelligent person&lt;br&gt;
&amp;gt;   could believe in them."                            --&lt;br&gt;
George Orwell&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 28 Jan 2008 04:44:36 -0500</pubDate>
      <title>Re: Adding New Axes Object to a Figure</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162720#411518</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fnjgsl$g4q$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
jk Wang &amp;lt;wjk1984@gmail.com&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;I want to write a program that can adding new axes, but &lt;br&gt;
&amp;gt;without changing the other axes existing on the figure. All &lt;br&gt;
&amp;gt;of these axes display different images. &lt;br&gt;
&lt;br&gt;
&amp;gt;So how can I keep the former axes (and their images) &lt;br&gt;
&amp;gt;unchanged while adding a new one? Help me please~ &lt;br&gt;
&lt;br&gt;
Just do it. The axes() function does not clear the figure.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;"There are some ideas so wrong that only a very intelligent person&lt;br&gt;
&amp;nbsp;&amp;nbsp;could believe in them."                            -- George Orwell&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 28 Jan 2008 03:07:01 -0500</pubDate>
      <title>Adding New Axes Object to a Figure</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162720#411513</link>
      <author>jk Wang</author>
      <description>Hi,guys,&lt;br&gt;
&lt;br&gt;
I want to write a program that can adding new axes, but &lt;br&gt;
without changing the other axes existing on the figure. All &lt;br&gt;
of these axes display different images. &lt;br&gt;
&lt;br&gt;
So how can I keep the former axes (and their images) &lt;br&gt;
unchanged while adding a new one? Help me please~ &lt;br&gt;
&lt;br&gt;
Thank you!!!&lt;br&gt;
&lt;br&gt;
JK Wang &lt;br&gt;
</description>
    </item>
  </channel>
</rss>
