Mathematica: How to update the same plot once it is created?
- From: "Nasser Abbasi" <nma@xxxxxxxxx>
- Date: Sun, 13 Jan 2008 13:49:35 -0800
This seems like it should be easy to do, but I really think this is
impossible to do in Mathematica.
Here is the problem: I make a plot. The plot is shown and displayed ok. Now,
later on, I want to update the same plot, but NOT create a separate plot.
There does not seem a way to do this.
Here is an example:
p=Plot[Sin[x],{x,-Pi,Pi}]
....
....
.... Now, I want to make changes to the above plot
..... say I want to add something to it, or redraw it
..... how??
I do not want to create a new plot window (i.e do not want to create a new
Cell), I want the updates to go to the plot display above, i.e. physically
the same plot window in the same cell as it was, and not create a new plot
window.
I am trying to do some simulation (discrete event simulation, one queue one
server basic model) where I want to update the same plot as time ticks go
by. and I need to be able to update the same plot window from different
places in the code (as the system state changes) and not have to create a
new plot window each time.
I do not want to use Manipulate or Animate as they do not fit what I am
trying to do, I need to be able to better control this, and I do not want to
combine the plots and display them at the end, I need to update the plots
right away.
The above sort of thing is easy to do in Matlab and R (is it possible to do
in Maple?) but I am surprised how hard it is to do in Mathematica.
I hope I am overlooking something simple, and someone has a solution to this
one. I looked at may be using SelectionMove[] to select the cell where the
plot is in and such tricks, but I am not sure yet, I am still trying to see
if this will work.
thanks,
Nasser
.
- Follow-Ups:
- Re: Mathematica: How to update the same plot once it is created?
- From: brett . champion
- Re: Mathematica: How to update the same plot once it is created?
- Prev by Date: Re: Factorizing Symbolic Matrices, How to ?
- Next by Date: Re: Mathematica: How to update the same plot once it is created?
- Previous by thread: VB go away
- Next by thread: Re: Mathematica: How to update the same plot once it is created?
- Index(es):
Relevant Pages
|
|