<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/252641</link>
    <title>MATLAB Central Newsreader - Most efficient way to continously update axes data in GUI</title>
    <description>Feed for thread: Most efficient way to continously update axes data in GUI</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, 01 Jun 2009 16:42:01 -0400</pubDate>
      <title>Most efficient way to continously update axes data in GUI</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/252641#653847</link>
      <author>Dennis Nord</author>
      <description>Hello!&lt;br&gt;
&lt;br&gt;
I have 2 axes and a total of 5 line children in my GUI which i populate with data using set(linehandle,'[x/y]data',[myvalues])... calls using an eventlistener to a simulink object (scope). Im using realtime windows target for control design applications.&lt;br&gt;
&lt;br&gt;
This solution working very well, although it seems to be very resource consuming (i would like to update my plot faster than 10 times per second which is the current max before gui gets delayed from my model!&lt;br&gt;
&lt;br&gt;
What would the fastest way be to continously update my lines? Is there any way to append the lines rather than resetting the entire x/y vector values each time? Can i make some configurations to my GUI to speed things up?&lt;br&gt;
&lt;br&gt;
Any suggestions would be very appreciated.&lt;br&gt;
&lt;br&gt;
Dennis</description>
    </item>
    <item>
      <pubDate>Thu, 16 Jul 2009 21:16:01 -0400</pubDate>
      <title>Re: Most efficient way to continously update axes data in GUI</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/252641#665919</link>
      <author>Glen Rutledge</author>
      <description>&quot;Dennis Nord&quot; &amp;lt;dennis.nord@gmail.com&amp;gt; wrote in message &amp;lt;h010cp$52a$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have 2 axes and a total of 5 line children in my GUI which i populate with data using set(linehandle,'[x/y]data',[myvalues])... calls using an eventlistener to a simulink object (scope). Im using realtime windows target for control design applications.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This solution working very well, although it seems to be very resource consuming (i would like to update my plot faster than 10 times per second which is the current max before gui gets delayed from my model!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; What would the fastest way be to continously update my lines? Is there any way to append the lines rather than resetting the entire x/y vector values each time? Can i make some configurations to my GUI to speed things up?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Any suggestions would be very appreciated.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Dennis&lt;br&gt;
&lt;br&gt;
Hi Dennis.  Interesting problem.  I have been doing similar things lately.  Have you tried changing the renderer for your figure?  If you have openGL, this is often faster than the default.  If hf is the handle for your GUI figure, then call set(hf,'Renderer','openGL') and see if that helps.&lt;br&gt;
&lt;br&gt;
Glen</description>
    </item>
    <item>
      <pubDate>Thu, 16 Jul 2009 21:17:17 -0400</pubDate>
      <title>Re: Most efficient way to continously update axes data in GUI</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/252641#665920</link>
      <author>Glen Rutledge</author>
      <description>&quot;Dennis Nord&quot; &amp;lt;dennis.nord@gmail.com&amp;gt; wrote in message &amp;lt;h010cp$52a$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have 2 axes and a total of 5 line children in my GUI which i populate with data using set(linehandle,'[x/y]data',[myvalues])... calls using an eventlistener to a simulink object (scope). Im using realtime windows target for control design applications.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This solution working very well, although it seems to be very resource consuming (i would like to update my plot faster than 10 times per second which is the current max before gui gets delayed from my model!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; What would the fastest way be to continously update my lines? Is there any way to append the lines rather than resetting the entire x/y vector values each time? Can i make some configurations to my GUI to speed things up?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Any suggestions would be very appreciated.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Dennis&lt;br&gt;
&lt;br&gt;
Hi Dennis.  Interesting problem.  I have been doing similar things lately.  Have you tried changing the renderer for your figure?  If you have openGL, this is often faster than the default.  If hf is the handle for your GUI figure, then call set(hf,'Renderer','openGL') and see if that helps.&lt;br&gt;
&lt;br&gt;
Glen</description>
    </item>
    <item>
      <pubDate>Thu, 17 Sep 2009 19:55:19 -0400</pubDate>
      <title>Re: Most efficient way to continously update axes data in GUI</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/252641#680936</link>
      <author>sagar </author>
      <description>Hi Glen, Dennis, &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;I am doing something similar. I have an axes object, and am plotting 4 fixed circles and one with increasing radius. Its like a ripple going out... and some fixed circles... and once the ripple reaches the edge, it finishes one iteration...then it will start again from the center... and it will keep on going in an infinite loop...&lt;br&gt;
&lt;br&gt;
but it seems that by default my system takes the renderer to be &quot;painters&quot;... and in this case, the speed of the simulation is good for the first two iterations...but after that it really slows down... &lt;br&gt;
&lt;br&gt;
i tried using OpenGL, but the simulation slows down from the first iteration itself, and it is worse than using &quot;painters&quot;...&lt;br&gt;
&lt;br&gt;
I am not sure if any of you faced a similar problem...&lt;br&gt;
&lt;br&gt;
-Sagar&lt;br&gt;
&lt;br&gt;
&quot;Glen Rutledge&quot; &amp;lt;grutledg@shaw.ca&amp;gt; wrote in message &amp;lt;h3o5ct$5gc$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Dennis Nord&quot; &amp;lt;dennis.nord@gmail.com&amp;gt; wrote in message &amp;lt;h010cp$52a$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hello!&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I have 2 axes and a total of 5 line children in my GUI which i populate with data using set(linehandle,'[x/y]data',[myvalues])... calls using an eventlistener to a simulink object (scope). Im using realtime windows target for control design applications.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; This solution working very well, although it seems to be very resource consuming (i would like to update my plot faster than 10 times per second which is the current max before gui gets delayed from my model!&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; What would the fastest way be to continously update my lines? Is there any way to append the lines rather than resetting the entire x/y vector values each time? Can i make some configurations to my GUI to speed things up?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Any suggestions would be very appreciated.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Dennis&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hi Dennis.  Interesting problem.  I have been doing similar things lately.  Have you tried changing the renderer for your figure?  If you have openGL, this is often faster than the default.  If hf is the handle for your GUI figure, then call set(hf,'Renderer','openGL') and see if that helps.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Glen</description>
    </item>
    <item>
      <pubDate>Fri, 18 Sep 2009 03:55:04 -0400</pubDate>
      <title>Re: Most efficient way to continously update axes data in GUI</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/252641#680996</link>
      <author>Rodney Thomson</author>
      <description>Try playing around with the line's 'EraseMode' property.&lt;br&gt;
&lt;br&gt;
By default it redraws the entire frame. Setting it to perhaps 'xor' might speed it up significantly.</description>
    </item>
    <item>
      <pubDate>Fri, 18 Sep 2009 05:29:18 -0400</pubDate>
      <title>Re: Most efficient way to continously update axes data in GUI</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/252641#681005</link>
      <author>Rodney Thomson</author>
      <description>Oh, and run the MATLAB Profiler, see if you can narrow down exactly where the time is being spent.</description>
    </item>
    <item>
      <pubDate>Fri, 18 Sep 2009 20:16:03 -0400</pubDate>
      <title>Re: Most efficient way to continously update axes data in GUI</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/252641#681222</link>
      <author>Ralph Schleicher</author>
      <description>&quot;Rodney Thomson&quot; &amp;lt;readmore@iheartmatlab.blogspot.com&amp;gt; writes:&lt;br&gt;
&lt;br&gt;
&amp;gt; Try playing around with the line's 'EraseMode' property.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; By default it redraws the entire frame. Setting it to perhaps 'xor'&lt;br&gt;
&amp;gt; might speed it up significantly.&lt;br&gt;
&lt;br&gt;
The correct combination is important.  If you set 'EraseMode' to&lt;br&gt;
'normal' for the animated objects, set the figure's 'DoubleBuffer'&lt;br&gt;
to 'on' and 'Renderer' to 'painters'.  If you set 'EraseMode' to&lt;br&gt;
'xor' for the animated objects, the figure's 'DoubleBuffer' has&lt;br&gt;
to be 'off'.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Ralph Schleicher  &amp;lt;&lt;a href=&quot;http://ralph-schleicher.de&quot;&gt;http://ralph-schleicher.de&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;
Development * Consulting * Training&lt;br&gt;
Mathematical Modeling and Simulation&lt;br&gt;
Software Tools</description>
    </item>
  </channel>
</rss>

