<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154786</link>
    <title>MATLAB Central Newsreader - Can a uicontrol contain a plot?</title>
    <description>Feed for thread: Can a uicontrol contain a plot?</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>Mon, 20 Aug 2007 00:08:09 -0400</pubDate>
      <title>Can a uicontrol contain a plot?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154786#388345</link>
      <author>G.A.M. </author>
      <description>I would like to make a series of small plots where any&lt;br&gt;
subplot, when clicked with the mouse, will open into a full&lt;br&gt;
sized plot with extra details.&lt;br&gt;
&lt;br&gt;
I have to do it all programmatically (in m files).&lt;br&gt;
&lt;br&gt;
Can I display a plot in a uicontrol (a push button)?&lt;br&gt;
&lt;br&gt;
If so, maybe I can add N uicontrols on a panel and display a&lt;br&gt;
plot on each uicontrol and assign a function to&lt;br&gt;
ButtonDownFcn that will grab some values from the plot's&lt;br&gt;
UserData and generate a new full sized plot (with more details).&lt;br&gt;
&lt;br&gt;
If this will work, can anyone give me some tips or examples&lt;br&gt;
on how to implement it? It would be cool if there is a way&lt;br&gt;
to add the uicontrols similar to the subplot method (i.e.,&lt;br&gt;
by using m, n, p). &lt;br&gt;
Thanks.</description>
    </item>
    <item>
      <pubDate>Mon, 20 Aug 2007 00:18:01 -0400</pubDate>
      <title>Re: Can a uicontrol contain a plot?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154786#388347</link>
      <author>G.A.M. </author>
      <description>I'm definitely going to need some help with this. So far I&lt;br&gt;
have learned:&lt;br&gt;
&lt;br&gt;
&quot;An object of class axes, can not be a child of class&lt;br&gt;
uicontrol.&quot;&lt;br&gt;
&lt;br&gt;
Any suggestions are appreciated.&lt;br&gt;
&lt;br&gt;
&quot;G.A.M. &quot; &amp;lt;x0zero@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;faam18$str$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I would like to make a series of small plots where any&lt;br&gt;
&amp;gt; subplot, when clicked with the mouse, will open into a full&lt;br&gt;
&amp;gt; sized plot with extra details.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have to do it all programmatically (in m files).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Can I display a plot in a uicontrol (a push button)?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If so, maybe I can add N uicontrols on a panel and display a&lt;br&gt;
&amp;gt; plot on each uicontrol and assign a function to&lt;br&gt;
&amp;gt; ButtonDownFcn that will grab some values from the plot's&lt;br&gt;
&amp;gt; UserData and generate a new full sized plot (with more&lt;br&gt;
details).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If this will work, can anyone give me some tips or examples&lt;br&gt;
&amp;gt; on how to implement it? It would be cool if there is a way&lt;br&gt;
&amp;gt; to add the uicontrols similar to the subplot method (i.e.,&lt;br&gt;
&amp;gt; by using m, n, p). &lt;br&gt;
&amp;gt; Thanks.</description>
    </item>
    <item>
      <pubDate>Mon, 20 Aug 2007 01:57:16 -0400</pubDate>
      <title>Re: Can a uicontrol contain a plot?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154786#388351</link>
      <author>Dan Haeg</author>
      <description>&quot;G.A.M. &quot; &amp;lt;x0zero@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;faam18$str$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I would like to make a series of small plots where any&lt;br&gt;
&amp;gt; subplot, when clicked with the mouse, will open into a full&lt;br&gt;
&amp;gt; sized plot with extra details.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have to do it all programmatically (in m files).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Can I display a plot in a uicontrol (a push button)?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If so, maybe I can add N uicontrols on a panel and display a&lt;br&gt;
&amp;gt; plot on each uicontrol and assign a function to&lt;br&gt;
&amp;gt; ButtonDownFcn that will grab some values from the plot's&lt;br&gt;
&amp;gt; UserData and generate a new full sized plot (with more&lt;br&gt;
details).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If this will work, can anyone give me some tips or examples&lt;br&gt;
&amp;gt; on how to implement it? It would be cool if there is a way&lt;br&gt;
&amp;gt; to add the uicontrols similar to the subplot method (i.e.,&lt;br&gt;
&amp;gt; by using m, n, p). &lt;br&gt;
&amp;gt; Thanks.&lt;br&gt;
&lt;br&gt;
A subplot can have a ButtonDownFcn</description>
    </item>
    <item>
      <pubDate>Mon, 20 Aug 2007 03:03:20 -0400</pubDate>
      <title>Re: Can a uicontrol contain a plot?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154786#388354</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;faam18$str$1@fred.mathworks.com&amp;gt;, G.A.M.  &amp;lt;x0zero@gmail.com&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;Can I display a plot in a uicontrol (a push button)?&lt;br&gt;
&lt;br&gt;
&amp;gt;If so, maybe I can add N uicontrols on a panel and display a&lt;br&gt;
&amp;gt;plot on each uicontrol and assign a function to&lt;br&gt;
&amp;gt;ButtonDownFcn that will grab some values from the plot's&lt;br&gt;
&amp;gt;UserData and generate a new full sized plot (with more details).&lt;br&gt;
&lt;br&gt;
uicontrols cannot, as you have indicated you learned, have axes&lt;br&gt;
as children.&lt;br&gt;
&lt;br&gt;
However, there is a sense in which a uicontrol could&lt;br&gt;
display a plot: pushbuttons and togglebuttons can have a CData&lt;br&gt;
property,&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Truecolor image displayed on control. A three-dimensional matrix of&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RGB values that defines a truecolor image displayed on a control,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;which must be a push button or toggle button. Each value must be&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;between 0.0 and 1.0.&lt;br&gt;
&lt;br&gt;
So if you were to render the plot offscreen, then use the rendered&lt;br&gt;
image as your CData, then the button would appear to have a&lt;br&gt;
(static!) plot.&lt;br&gt;
&lt;br&gt;
I am not recommending this method; it just would not be quite&lt;br&gt;
right to say that uicontrols -cannot- have &quot;plots&quot;.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;I was very young in those days, but I was also rather dim.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-- Christopher Priest</description>
    </item>
    <item>
      <pubDate>Mon, 20 Aug 2007 03:26:08 -0400</pubDate>
      <title>Re: Can a uicontrol contain a plot?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154786#388357</link>
      <author>G.A.M. </author>
      <description>Thanks for both the suggestions. &lt;br&gt;
&lt;br&gt;
I think I'll try adding a ButtonDownFcn to a subplot. If&lt;br&gt;
that doesn't fit my needs, I'll try the creative CData&lt;br&gt;
suggestion. Thanks!&lt;br&gt;
&lt;br&gt;
roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
message &amp;lt;fab09o$f8e$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&amp;gt; In article &amp;lt;faam18$str$1@fred.mathworks.com&amp;gt;, G.A.M. &lt;br&gt;
&amp;lt;x0zero@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;Can I display a plot in a uicontrol (a push button)?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;If so, maybe I can add N uicontrols on a panel and display a&lt;br&gt;
&amp;gt; &amp;gt;plot on each uicontrol and assign a function to&lt;br&gt;
&amp;gt; &amp;gt;ButtonDownFcn that will grab some values from the plot's&lt;br&gt;
&amp;gt; &amp;gt;UserData and generate a new full sized plot (with more&lt;br&gt;
details).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; uicontrols cannot, as you have indicated you learned, have&lt;br&gt;
axes&lt;br&gt;
&amp;gt; as children.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; However, there is a sense in which a uicontrol could&lt;br&gt;
&amp;gt; display a plot: pushbuttons and togglebuttons can have a CData&lt;br&gt;
&amp;gt; property,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;     Truecolor image displayed on control. A&lt;br&gt;
three-dimensional matrix of&lt;br&gt;
&amp;gt;     RGB values that defines a truecolor image displayed on&lt;br&gt;
a control,&lt;br&gt;
&amp;gt;     which must be a push button or toggle button. Each&lt;br&gt;
value must be&lt;br&gt;
&amp;gt;     between 0.0 and 1.0.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; So if you were to render the plot offscreen, then use the&lt;br&gt;
rendered&lt;br&gt;
&amp;gt; image as your CData, then the button would appear to have a&lt;br&gt;
&amp;gt; (static!) plot.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am not recommending this method; it just would not be quite&lt;br&gt;
&amp;gt; right to say that uicontrols -cannot- have &quot;plots&quot;.&lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt;    I was very young in those days, but I was also rather dim.&lt;br&gt;
&amp;gt;    -- Christopher Priest</description>
    </item>
    <item>
      <pubDate>Mon, 20 Aug 2007 14:16:15 -0400</pubDate>
      <title>Re: Can a uicontrol contain a plot?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154786#388410</link>
      <author>G.A.M. </author>
      <description>&quot;Dan Haeg&quot; &amp;lt;haegd@msoe.edu&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;gt; I would like to make a series of small plots where any&lt;br&gt;
&amp;gt; &amp;gt; subplot, when clicked with the mouse, will open into a &lt;br&gt;
&amp;gt; &amp;gt; full sized plot with extra details.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; A subplot can have a ButtonDownFcn&lt;br&gt;
&lt;br&gt;
What is the best way to obtain the value of the current&lt;br&gt;
subplot's UserData property (or any other property) from&lt;br&gt;
within the function assigned to ButtonDownFcn? The current&lt;br&gt;
subplot should be the one being clicked, right? Or is it a&lt;br&gt;
bit more nebulous than that?</description>
    </item>
    <item>
      <pubDate>Mon, 20 Aug 2007 14:37:53 -0400</pubDate>
      <title>Re: Can a uicontrol contain a plot?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154786#388416</link>
      <author>Dan Haeg</author>
      <description>&quot;G.A.M. &quot; &amp;lt;x0zero@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fac7nf$r4u$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Dan Haeg&quot; &amp;lt;haegd@msoe.edu&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I would like to make a series of small plots where any&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; subplot, when clicked with the mouse, will open into a &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; full sized plot with extra details.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; A subplot can have a ButtonDownFcn&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; What is the best way to obtain the value of the current&lt;br&gt;
&amp;gt; subplot's UserData property (or any other property) from&lt;br&gt;
&amp;gt; within the function assigned to ButtonDownFcn? The current&lt;br&gt;
&amp;gt; subplot should be the one being clicked, right? Or is it a&lt;br&gt;
&amp;gt; bit more nebulous than that?&lt;br&gt;
&lt;br&gt;
gca is the current subplot as you would expect.&lt;br&gt;
&lt;br&gt;
get(gca,'userdata')</description>
    </item>
    <item>
      <pubDate>Mon, 20 Aug 2007 17:02:10 -0400</pubDate>
      <title>Re: Can a uicontrol contain a plot?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154786#388457</link>
      <author>G.A.M. </author>
      <description>This thread is related to another one I started. Here is the&lt;br&gt;
link:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/154780&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/154780&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
I cannot get the code:&lt;br&gt;
&lt;br&gt;
get(gca,'userdata')&lt;br&gt;
&lt;br&gt;
to work correctly yet.&lt;br&gt;
&lt;br&gt;
Also, what is the best way to reference another thread in&lt;br&gt;
this newsgroup? Is a link such as the one above OK?&lt;br&gt;
&lt;br&gt;
Also, is there a faq that discusses things like whether I&lt;br&gt;
should trim the previous messages or not when replying? &lt;br&gt;
&lt;br&gt;
Thanks.&lt;br&gt;
&lt;br&gt;
&quot;Dan Haeg&quot; &amp;lt;haegd@msoe.edu&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; gca is the current subplot as you would expect.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; get(gca,'userdata')</description>
    </item>
  </channel>
</rss>

