Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: Can a uicontrol contain a plot?
Date: Mon, 20 Aug 2007 03:03:20 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 30
Message-ID: <fab09o$f8e$1@canopus.cc.umanitoba.ca>
References: <faam18$str$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1187579000 15630 192.70.172.160 (20 Aug 2007 03:03:20 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Mon, 20 Aug 2007 03:03:20 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:424528



In article <faam18$str$1@fred.mathworks.com>, G.A.M.  <x0zero@gmail.com> wrote:

>Can I display a plot in a uicontrol (a push button)?

>If so, maybe I can add N uicontrols on a panel and display a
>plot on each uicontrol and assign a function to
>ButtonDownFcn that will grab some values from the plot's
>UserData and generate a new full sized plot (with more details).

uicontrols cannot, as you have indicated you learned, have axes
as children.

However, there is a sense in which a uicontrol could
display a plot: pushbuttons and togglebuttons can have a CData
property,

    Truecolor image displayed on control. A three-dimensional matrix of
    RGB values that defines a truecolor image displayed on a control,
    which must be a push button or toggle button. Each value must be
    between 0.0 and 1.0.

So if you were to render the plot offscreen, then use the rendered
image as your CData, then the button would appear to have a
(static!) plot.

I am not recommending this method; it just would not be quite
right to say that uicontrols -cannot- have "plots".
-- 
   I was very young in those days, but I was also rather dim.
   -- Christopher Priest