MathGroup Archive 2000

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

Search the Archive

Re: Real-time plotting

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22742] Re: Real-time plotting
  • From: "Dale Horton" <daleh at wolfram.com>
  • Date: Fri, 24 Mar 2000 03:27:33 -0500 (EST)
  • Organization: Wolfram Research, Inc.
  • References: <8aqq22$a1i@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Aram Schiffman <aram at sirius.com> wrote in message
news:8aqq22$a1i at smc.vnet.net...
> Hi all,
>
> Sorry if this is an oldie, but ...
>
> How might I conjure up a method for real-time plotting? What I have in
> mind is this: every time a function calulates a new point, it updates
> a plot (presumably, a listplot). When I've collected enough points to
> satisfy myself, I hit a key or click the mouse or enter the interrupt
> command, and it aborts. What I don't want to do is accumulate one new
> plot per new point (obviously, I guess).
>
> Can anyone clue me in?
>
> Much obliged, in advance.
>

See http://support.wolfram.com/Graphics/Animations/NotebookWrite.html

Here's the variation you want:

Module[{pts = {}, nb = EvaluationNotebook[]},
  CellPrint[Cell["", "Graphics"]];
  While[True,
    AppendTo[pts, {Random[], Random[]}];
    SelectionMove[nb, All, GeneratedCell];
    NotebookWrite[nb,
      Cell[GraphicsData["PostScript",
          DisplayString[
            ListPlot[pts, PlotRange -> {{0, 1}, {0, 1}},
              DisplayFunction -> Identity]]], "Graphics"]];
    Pause[1];
    ]
  ]

Use Kernel|Abort Evaluation to stop the infinte loop.




  • Prev by Date: Re: pattern in list of derivatives
  • Next by Date: Working with lists of matrices.
  • Previous by thread: Re: Real-time plotting
  • Next by thread: Re: Real-time plotting