[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plotting in pseudo Real Time
From: |
Ben Abbott |
Subject: |
Re: Plotting in pseudo Real Time |
Date: |
Mon, 24 Oct 2011 09:10:19 -0400 |
On Oct 23, 2011, at 3:28 PM, Chris Seddon wrote:
> Hi
>
> Is it possible to create a 3D plot using data that is generated dynamically
> from a C++ program such that the display continually updates as the data
> changes (i.e. NOT using a disk file complete with all the data to be
> plotted). I would hope that this is possible without redrawing the whole
> plot each time.
>
> Regards
> Chris Seddon
Yes you can do that by using the xdatasource, ydatasource, and zdatasource
properties.
A simple 2D example is below.
x = 0:0.1:10;
y = sin (x);
h = plot (x, y)
set (h, "xdatasource", "x");
set (h, "ydatasource", "y");
## Change the y data and refresh the plot
y = sin (x.^2);
refreshdata
Ben