|
On 10/3/2012 11:50 AM, Elnaz wrote:
> Hi all,
> Can we use "hold on" and "drawnow" together in one plot?
> I want to have a curve #1 fixed and then frequently update a curve #2
> against the first one. How should I do that?
Read the section on "Animation" in the Graphics documentation.
For that kind of operation set()'ing the YData array of the second curve
will be much faster than redrawing the whole plot.
There's no magic about 'hold' and 'drawnow' other than using them at the
proper time(s) to get the effect desired. Setting the actual data using
the object handle eliminates the need for drawnow anyway, in most cases
at least.
--
|