<?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: Handle This!</title>
	<atom:link href="http://blogs.mathworks.com/loren/2006/08/16/handle-this/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/</link>
	<description>Loren Shure works on design of the MATLAB language at MathWorks. She writes here about once a week on MATLAB programming and related topics.</description>
	<lastBuildDate>Thu, 09 Feb 2012 04:19:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/#comment-29775</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 25 Sep 2008 19:13:49 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=50#comment-29775</guid>
		<description>Jason-

In a GUI, there are plenty of places to tuck such info without using UserData, e.g., AppData.  That is less likely to get corrupted, imo...

--Loren</description>
		<content:encoded><![CDATA[<p>Jason-</p>
<p>In a GUI, there are plenty of places to tuck such info without using UserData, e.g., AppData.  That is less likely to get corrupted, imo&#8230;</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/#comment-29774</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 25 Sep 2008 19:09:34 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=50#comment-29774</guid>
		<description>Loren,

Obviously this is 2 years later, but I found your statement saying you were not a &quot;fan&quot; of using UserData fields.  I thought I might propose one reason that I think UserData might be appropriate.

There have been some GUI instances where there is a pop-up menu with a list of options.  Based on the selected option, a different parameter value is submitted to a function.  Sometimes, the parameter value is an abbreviation, such as &#039;deg&#039; for &#039;Degrees&#039;.  Since I want to be formal with my GUI and spell out things fully in the pop-up, I find it useful to store the parameter values which correspond to the options in the UserData as an array or cell of strings.  I guess I see it as a waste to have a variable dedicated to storing these because they only matter to that one particular task, and the Value property is used to index the parameter value array/cell in that particular callback.

Jason</description>
		<content:encoded><![CDATA[<p>Loren,</p>
<p>Obviously this is 2 years later, but I found your statement saying you were not a &#8220;fan&#8221; of using UserData fields.  I thought I might propose one reason that I think UserData might be appropriate.</p>
<p>There have been some GUI instances where there is a pop-up menu with a list of options.  Based on the selected option, a different parameter value is submitted to a function.  Sometimes, the parameter value is an abbreviation, such as &#8216;deg&#8217; for &#8216;Degrees&#8217;.  Since I want to be formal with my GUI and spell out things fully in the pop-up, I find it useful to store the parameter values which correspond to the options in the UserData as an array or cell of strings.  I guess I see it as a waste to have a variable dedicated to storing these because they only matter to that one particular task, and the Value property is used to index the parameter value array/cell in that particular callback.</p>
<p>Jason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lassi</title>
		<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/#comment-14514</link>
		<dc:creator>Lassi</dc:creator>
		<pubDate>Thu, 09 Nov 2006 15:33:51 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=50#comment-14514</guid>
		<description>I think that (online) documentation regarding handles related to plotting is quite poor and the handles get more complex if you do more complicated plottin. For instance, in a subplot with two plots, things can get really strange. If I try to access specifically the handle of the second subplot title, (figure.axes.title) I should get a cell array, but this only happens if I first try to get its parameters. I assume this is due to handlevisibility property set to off which effectively prevents me from accessing it.

So, how am I supposed to manipulate the title of the second (or nth) subplot? No problem with the first...</description>
		<content:encoded><![CDATA[<p>I think that (online) documentation regarding handles related to plotting is quite poor and the handles get more complex if you do more complicated plottin. For instance, in a subplot with two plots, things can get really strange. If I try to access specifically the handle of the second subplot title, (figure.axes.title) I should get a cell array, but this only happens if I first try to get its parameters. I assume this is due to handlevisibility property set to off which effectively prevents me from accessing it.</p>
<p>So, how am I supposed to manipulate the title of the second (or nth) subplot? No problem with the first&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/#comment-13773</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Mon, 23 Oct 2006 12:02:26 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=50#comment-13773</guid>
		<description>Kathirvel-

You should be able to subscribe in a similar way that you did for Steve&#039;s.  If you go to the right side in the blue area on my blog, you will see an area labeled Subscribe that has directions.

--Loren</description>
		<content:encoded><![CDATA[<p>Kathirvel-</p>
<p>You should be able to subscribe in a similar way that you did for Steve&#8217;s.  If you go to the right side in the blue area on my blog, you will see an area labeled Subscribe that has directions.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kathirvel Thiyagarajan</title>
		<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/#comment-13727</link>
		<dc:creator>Kathirvel Thiyagarajan</dc:creator>
		<pubDate>Sun, 22 Oct 2006 08:14:39 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=50#comment-13727</guid>
		<description>Respected Loren,

I am receiving blog posts from Steve Eddins.
Recently i came to know about your blog posts in steve blogs.
But i am unable to subscribe to your blogs.
Kindly help me.</description>
		<content:encoded><![CDATA[<p>Respected Loren,</p>
<p>I am receiving blog posts from Steve Eddins.<br />
Recently i came to know about your blog posts in steve blogs.<br />
But i am unable to subscribe to your blogs.<br />
Kindly help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver A. Chapman, PE</title>
		<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/#comment-8767</link>
		<dc:creator>Oliver A. Chapman, PE</dc:creator>
		<pubDate>Sat, 19 Aug 2006 14:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=50#comment-8767</guid>
		<description>Loren,

Another good topic to cover.  Although, I suspect you only scratched the surface.

How does a handle compare and contrast to a data structure?</description>
		<content:encoded><![CDATA[<p>Loren,</p>
<p>Another good topic to cover.  Although, I suspect you only scratched the surface.</p>
<p>How does a handle compare and contrast to a data structure?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/#comment-8625</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 17 Aug 2006 19:08:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=50#comment-8625</guid>
		<description>Personally I thinking storing information in &#039;userdata&#039; is a poor idea.  You&#039;d be better off using a nested function and keeping a handle to the resource stored with the function handle.  That way, you don&#039;t stand a chance for userdata to get corrupted.</description>
		<content:encoded><![CDATA[<p>Personally I thinking storing information in &#8216;userdata&#8217; is a poor idea.  You&#8217;d be better off using a nested function and keeping a handle to the resource stored with the function handle.  That way, you don&#8217;t stand a chance for userdata to get corrupted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lehalle</title>
		<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/#comment-8624</link>
		<dc:creator>lehalle</dc:creator>
		<pubDate>Thu, 17 Aug 2006 19:05:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=50#comment-8624</guid>
		<description>you did not write anything about database and misc datasources (as financial data providers) connection handles. they are very heterogeneous (oracle, bloomberg, datastream, etc).

rather than openning and closing those connections after each use, I choose to strore them into the get(0, &#039;userdata&#039;) property, they are in an hashtable indexed by any connection string that has been use and I close them before quiting matlab with a statement like your:

all(arrayfun(@fclose, fids)==0)

have you a point of view about that?

regards
charles</description>
		<content:encoded><![CDATA[<p>you did not write anything about database and misc datasources (as financial data providers) connection handles. they are very heterogeneous (oracle, bloomberg, datastream, etc).</p>
<p>rather than openning and closing those connections after each use, I choose to strore them into the get(0, &#8216;userdata&#8217;) property, they are in an hashtable indexed by any connection string that has been use and I close them before quiting matlab with a statement like your:</p>
<p>all(arrayfun(@fclose, fids)==0)</p>
<p>have you a point of view about that?</p>
<p>regards<br />
charles</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lehalle</title>
		<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/#comment-8622</link>
		<dc:creator>lehalle</dc:creator>
		<pubDate>Thu, 17 Aug 2006 18:06:32 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=50#comment-8622</guid>
		<description>Do you think about a method to change the color (or any other property, like linewidth) of all the elements of a plot produce by a built-in function?

for instance there is no way to specify the linewidth of the boxplot function, so I use something like that:

figure;
X = randn(100,1);
plot(ones(size(X)),X,&#039;.k&#039;);
c = get(gca,&#039;children&#039;);
hold on
boxplot(X);
hold off
bpc = setdiff(get(gca,&#039;children&#039;), c);
set(bpc, &#039;linewidth&#039;,2, &#039;color&#039;, [0 .5 .5]);

but for functions like candle, it cannot work because candle is made with lines and patchs (and patch do not have a color property), so I use a switch/case control on the object type...

for candle it&#039;s especially usefull because the original code (2006a) does not allow to change the color (it only changes the color of the patchs), cf:
http://en.literateprograms.org/Matlab_Financial_Toolbox

may be it is possible to &#039;group&#039; handles like with something like &#039;hggroup&#039; (but I did not had a lot of success with it) and then to change all properties at once?

thanks
charles</description>
		<content:encoded><![CDATA[<p>Do you think about a method to change the color (or any other property, like linewidth) of all the elements of a plot produce by a built-in function?</p>
<p>for instance there is no way to specify the linewidth of the boxplot function, so I use something like that:</p>
<p>figure;<br />
X = randn(100,1);<br />
plot(ones(size(X)),X,&#8217;.k&#8217;);<br />
c = get(gca,&#8217;children&#8217;);<br />
hold on<br />
boxplot(X);<br />
hold off<br />
bpc = setdiff(get(gca,&#8217;children&#8217;), c);<br />
set(bpc, &#8216;linewidth&#8217;,2, &#8216;color&#8217;, [0 .5 .5]);</p>
<p>but for functions like candle, it cannot work because candle is made with lines and patchs (and patch do not have a color property), so I use a switch/case control on the object type&#8230;</p>
<p>for candle it&#8217;s especially usefull because the original code (2006a) does not allow to change the color (it only changes the color of the patchs), cf:<br />
<a href="http://en.literateprograms.org/Matlab_Financial_Toolbox" rel="nofollow">http://en.literateprograms.org/Matlab_Financial_Toolbox</a></p>
<p>may be it is possible to &#8216;group&#8217; handles like with something like &#8216;hggroup&#8217; (but I did not had a lot of success with it) and then to change all properties at once?</p>
<p>thanks<br />
charles</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/08/16/handle-this/#comment-8608</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 17 Aug 2006 11:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=50#comment-8608</guid>
		<description>Hi Junziyang-

handle is an undocumented feature related to handle graphics for internal use at the moment so we can refactor some of the internal underpinnings and maintain compatibility.

I doubt you should find a need for it.

--Loren</description>
		<content:encoded><![CDATA[<p>Hi Junziyang-</p>
<p>handle is an undocumented feature related to handle graphics for internal use at the moment so we can refactor some of the internal underpinnings and maintain compatibility.</p>
<p>I doubt you should find a need for it.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
</channel>
</rss>

