MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Online Graphic Output


felixheiner wrote:
> Normally Mathematica uses data sets that are collected before plotting. I receive a data stream from internet and I would like to display these data points immediately. A typical application of this kind could be a online chart of changing prices. Although I am an experienced user of Mathematica 2-7 for many years, I do not know, how to program this application type. Could anybody help out ?
> 
The essential idea is to use Dynamic - for example:

data = {1, 3, 5, 6, 8, 10};

Print[Dynamic[ListPlot[data]]];

     followed by code which updates the vector data.

Each time the vector data is updated the plot will change.

A Dynamic object changes when the data on which it depends changes.

If the vector data is frequently updated, you may need to take a little 
care to ensure that multiple changes happen in one go.

To get a really smooth effect, you should also think about computing the 
plot range so that it only changes occasionally - otherwise the result 
may be hard to view if the changes are rapid.

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: How do I DistributeDefinitions inside a function?
  • Next by Date: Re: ParametricPlot problem
  • Previous by thread: Re: Online Graphic Output
  • Next by thread: Re: Online Graphic Output