<?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: Legend &#8216;-DynamicLegend&#8217; semi-documented feature</title> <atom:link href="http://undocumentedmatlab.com/blog/legend-semi-documented-feature/feed/" rel="self" type="application/rss+xml" /><link>http://undocumentedmatlab.com/blog/legend-semi-documented-feature/</link> <description>Charting Matlab's unsupported hidden underbelly</description> <lastBuildDate>Thu, 09 Feb 2012 09:23:08 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1.1</generator> <item><title>By: Stephan</title><link>http://undocumentedmatlab.com/blog/legend-semi-documented-feature/#comment-70611</link> <dc:creator>Stephan</dc:creator> <pubDate>Thu, 12 Jan 2012 13:18:14 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=357#comment-70611</guid> <description>I was searching for a way to use a legend&#039;s &quot;refresh&quot; function (that is available when right-clicking on the legend with the mouse) in a script. When I came across this post I first thought this was the way Matlab implemented the &quot;refresh&quot; functionality.
However, &#039;DynamicLegend&#039; only seems to react to additions or deletions to the axes: switching the &#039;Visibility&#039; of a line to &#039;off&#039; or switching the legend entry off by
&lt;pre lang=&quot;matlab&quot;&gt;
set(get(get(line_handle,&#039;Annotation&#039;),&#039;LegendInformation&#039;),&#039;IconDisplayStyle&#039;,&#039;off&#039;)
&lt;/pre&gt;
is ignored by the &#039;DynamicLegend&#039; feature. The &quot;refresh&quot; function correctly removes the corresponding legend entry in these cases.
Do you know how to use &quot;refresh&quot; from the command line?</description> <content:encoded><![CDATA[<p>I was searching for a way to use a legend&#8217;s &#8220;refresh&#8221; function (that is available when right-clicking on the legend with the mouse) in a script. When I came across this post I first thought this was the way Matlab implemented the &#8220;refresh&#8221; functionality.<br
/> However, &#8216;DynamicLegend&#8217; only seems to react to additions or deletions to the axes: switching the &#8216;Visibility&#8217; of a line to &#8216;off&#8217; or switching the legend entry off by</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>line_handle,<span style="color:#A020F0;">'Annotation'</span><span style="color: #080;">&#41;</span>,<span style="color:#A020F0;">'LegendInformation'</span><span style="color: #080;">&#41;</span>,<span style="color:#A020F0;">'IconDisplayStyle'</span>,<span style="color:#A020F0;">'off'</span><span style="color: #080;">&#41;</span></pre></div></div><p>is ignored by the &#8216;DynamicLegend&#8217; feature. The &#8220;refresh&#8221; function correctly removes the corresponding legend entry in these cases.<br
/> Do you know how to use &#8220;refresh&#8221; from the command line?</p> ]]></content:encoded> </item> <item><title>By: Uitable sorting &#124; Undocumented Matlab</title><link>http://undocumentedmatlab.com/blog/legend-semi-documented-feature/#comment-52359</link> <dc:creator>Uitable sorting &#124; Undocumented Matlab</dc:creator> <pubDate>Tue, 26 Jul 2011 18:03:51 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=357#comment-52359</guid> <description>[...] After many years in which the &lt;i&gt;&lt;b&gt;uitable&lt;/b&gt;&lt;/i&gt; was available but semi-documented and not officially supported in Matlab, it finally became fully documented and supported in R2008a [...]</description> <content:encoded><![CDATA[<p>[...] After many years in which the <i><b>uitable</b></i> was available but semi-documented and not officially supported in Matlab, it finally became fully documented and supported in R2008a [...]</p> ]]></content:encoded> </item> <item><title>By: handle2struct, struct2handle &#38; Matlab 8.0 &#124; Undocumented Matlab</title><link>http://undocumentedmatlab.com/blog/legend-semi-documented-feature/#comment-27566</link> <dc:creator>handle2struct, struct2handle &#38; Matlab 8.0 &#124; Undocumented Matlab</dc:creator> <pubDate>Wed, 29 Dec 2010 18:02:59 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=357#comment-27566</guid> <description>[...] under the hood, &lt;i&gt;&lt;b&gt;hgsave&lt;/b&gt;&lt;/i&gt; uses the semi-documented built-in &lt;i&gt;&lt;b&gt;handle2struct&lt;/b&gt;&lt;/i&gt; function to convert the figure handle into a Matlab struct [...]</description> <content:encoded><![CDATA[<p>[...] under the hood, <i><b>hgsave</b></i> uses the semi-documented built-in <i><b>handle2struct</b></i> function to convert the figure handle into a Matlab struct [...]</p> ]]></content:encoded> </item> <item><title>By: uitree &#124; Undocumented Matlab</title><link>http://undocumentedmatlab.com/blog/legend-semi-documented-feature/#comment-15073</link> <dc:creator>uitree &#124; Undocumented Matlab</dc:creator> <pubDate>Wed, 11 Aug 2010 18:02:01 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=357#comment-15073</guid> <description>[...] uitools in the %matlabroot%/toolbox/matlab/uitools/ folder, &lt;i&gt;&lt;b&gt;uitree&lt;/b&gt;&lt;/i&gt; and its companion &lt;i&gt;&lt;b&gt;uitreenode&lt;/b&gt;&lt;/i&gt; are semi-documented, meaning that they have no support or doc-page, but do have readable help sections within [...]</description> <content:encoded><![CDATA[<p>[...] uitools in the %matlabroot%/toolbox/matlab/uitools/ folder, <i><b>uitree</b></i> and its companion <i><b>uitreenode</b></i> are semi-documented, meaning that they have no support or doc-page, but do have readable help sections within [...]</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/legend-semi-documented-feature/#comment-1535</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Thu, 02 Jul 2009 19:16:57 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=357#comment-1535</guid> <description>Thanks Pietro.I plan to write a post about some of &lt;b&gt;&lt;i&gt;feature&lt;/i&gt;&lt;/b&gt;&#039;s features in the future. Keep a look-out for this on this blog. You can see this in my &lt;a href=&quot;http://undocumentedmatlab.com/todo/&quot; rel=&quot;nofollow&quot;&gt;TODO list&lt;/a&gt;.So much to do, so little time...Yair</description> <content:encoded><![CDATA[<p>Thanks Pietro.</p><p>I plan to write a post about some of <b><i>feature</i></b>&#8216;s features in the future. Keep a look-out for this on this blog. You can see this in my <a
href="http://undocumentedmatlab.com/todo/" rel="nofollow">TODO list</a>.</p><p>So much to do, so little time&#8230;</p><p>Yair</p> ]]></content:encoded> </item> <item><title>By: Pietro</title><link>http://undocumentedmatlab.com/blog/legend-semi-documented-feature/#comment-1529</link> <dc:creator>Pietro</dc:creator> <pubDate>Thu, 02 Jul 2009 13:31:44 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=357#comment-1529</guid> <description>I was looking for an undocumented matlab feature named &#039;feature&#039; and google luckied me here. Maybe you know something about. I tried&lt;pre lang=&quot;matlab&quot;&gt;
which feature
&lt;/pre&gt;
and I found out this &#039;feature&#039; is an undocumented built-in function.How I got across it?I typed configinfo.m M-file attached to &lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/18510&quot; rel=&quot;nofollow&quot;&gt; Matlab white paper on performance. &lt;/a&gt;Nice blog, useful even for a beginner in Matlab as I am. :)</description> <content:encoded><![CDATA[<p>I was looking for an undocumented matlab feature named &#8216;feature&#8217; and google luckied me here. Maybe you know something about. I tried</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">which</span> feature</pre></div></div><p>and I found out this &#8216;feature&#8217; is an undocumented built-in function.</p><p>How I got across it?</p><p>I typed configinfo.m M-file attached to <a
href="http://www.mathworks.com/matlabcentral/fileexchange/18510" rel="nofollow"> Matlab white paper on performance. </a></p><p>Nice blog, useful even for a beginner in Matlab as I am. <img
src='http://undocumentedmatlab.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Ustun Ozgur</title><link>http://undocumentedmatlab.com/blog/legend-semi-documented-feature/#comment-1183</link> <dc:creator>Ustun Ozgur</dc:creator> <pubDate>Fri, 05 Jun 2009 13:01:10 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=357#comment-1183</guid> <description>Thanks for this tip.
I was in a similar need, and was getting the legend cell via get, appending the new string, and setting the cell back.&lt;pre lang=&quot;matlab&quot;&gt;
leghandle = findall(gcf, &#039;tag&#039;, &#039;legend&#039;);
legstr = get(leg,&#039;String&#039;);
% ensure legstr is a cell, not a string
if ischar(legstr), legstr = mat2cell(legstr); end
legstr(end+1) = {&#039;New legend string&#039;};
&lt;/pre&gt;This seems much simpler.</description> <content:encoded><![CDATA[<p>Thanks for this tip.<br
/> I was in a similar need, and was getting the legend cell via get, appending the new string, and setting the cell back.</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">leghandle = findall<span style="color: #080;">&#40;</span><span style="color: #0000FF;">gcf</span>, <span style="color:#A020F0;">'tag'</span>, <span style="color:#A020F0;">'legend'</span><span style="color: #080;">&#41;</span>;
legstr = <span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>leg,<span style="color:#A020F0;">'String'</span><span style="color: #080;">&#41;</span>;
<span style="color: #228B22;">% ensure legstr is a cell, not a string</span>
<span style="color: #0000FF;">if</span> <span style="color: #0000FF;">ischar</span><span style="color: #080;">&#40;</span>legstr<span style="color: #080;">&#41;</span>, legstr = mat2cell<span style="color: #080;">&#40;</span>legstr<span style="color: #080;">&#41;</span>; <span style="color: #0000FF;">end</span>
legstr<span style="color: #080;">&#40;</span><span style="color: #0000FF;">end</span>+<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span> = <span style="color: #080;">&#123;</span><span style="color:#A020F0;">'New legend string'</span><span style="color: #080;">&#125;</span>;</pre></div></div><p>This seems much simpler.</p> ]]></content:encoded> </item> </channel> </rss>

<!-- W3 Total Cache: Minify debug info:
Engine:             disk: basic
Theme:              b7666
Template:           single
-->
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: undocumentedmatlab.com @ 2012-02-09 05:28:53 -->

<!-- W3 Total Cache: Page cache debug info:
Engine:             disk: enhanced
Cache key:          blog/legend-semi-documented-feature/feed/_index.xml_gzip
Caching:            enabled
Status:             not cached
Creation Time:      0.564s
Header info:
X-Pingback:         http://undocumentedmatlab.com/blog/xmlrpc.php
Set-Cookie:         wpgb_visit_last_php-default=1328790533; expires=Fri, 08-Feb-2013 12:28:53 GMT; path=/
Link:               <http://undocumentedmatlab.com/?p=357>; rel=shortlink
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Thu, 09 Feb 2012 12:28:53 GMT
Vary:               Accept-Encoding, Cookie
Expires:            Thu, 09 Feb 2012 13:28:53 GMT
Pragma:             public
Cache-Control:      public, must-revalidate, proxy-revalidate
Etag:               9de2eb5417cdea2ebff577af0af4724c
Content-Encoding:   gzip
-->
