MathGroup Archive 2000

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

Search the Archive

Re: Is it possible to plot a point a time on the same graph in Mathematica?


> I have a lot of points endlessly generated by the
> Mathematica 4.0 which needed to be ploted.
> At first I send the points to an List, then use ListPlot to
> plot them.
> But I found it need too much time to get the result picture.
> Is it possible to plot a point a time on the same graph in
> Mathematica so that I can watch the progress instead of
> keeping on waiting.

I've had the same problem, a quick hack that basically did what I needed
follows. It is good if the calculation of the single points takes long
but the graphics-rendering is quick (should almost always be the case
for ListPlot). Still it is not perfect and makes your notebook jump, but
probably that can even be circumvent by some more sophisticated

If the rendering itself is timeconsuming, you probably need to get a
little further. I know that there are also (undocumented) features that
let you send Postscript to the Frontend step by step and then display
the current state of the graphics during the rendering process. There is
a vague description of it in "The Beginners Guide To Mathematica" by
Jerry Glynn & Theodore Gray, but you'll need a good knowledge of
mathlink and probably also postscript to do this (Of course you can
argue that this solution is not really "within Mathematica").

As the question seem to be asked once in a while, probably someone has
written a package which does this?


Block[{l = {0}},
    CellPrint[Cell[" "]];
    nb = EvaluationNotebook[];
      AppendTo[l, i^2];
      ds = 
          ListPlot[l, DisplayFunction -> Identity, PlotJoined -> True, 
            PlotRange -> {{0, 10}, {0, 100}}]
      SelectionMove[nb, All, EvaluationCell]; SelectionMove[nb, Next,
      SelectionMove[nb, All, Cell];
      CellPrint[Cell[GraphicsData["PostScript", ds]]];
      , {i, 1, 10}]

  • Prev by Date: A stupid but practical question
  • Next by Date: About Parallel Computing
  • Previous by thread: Is it possible to plot a point a time on the same graph in Mathematica?
  • Next by thread: less verbose warning messages