Subject: [Viper-dev] Plotting time series

From: Ola Skavhaug <[email-masked]>
Date: Tue, 29 May 2007 18:11:38 +0200

In dolfin, how would you like to plot time series?

The most straight forward way would be the following syntax:

p = plot(u0, "noninteractive")
p.update(u1)

The alternative would be:

plot(u0, "noninterative")
plot(u1, "noninterative")

This is a bit more difficult to make work, as I cannot be sure that u1 is
plottable on the same mesh as u0 (generally, it isn't).

Ola

---

From: Anders Logg <[email-masked]>
Date: Tue, 29 May 2007 18:15:25 +0200

> p = plot(u0, "noninteractive")

This looks good to me.

If you want to update a plot, then you should need to keep the handle
to it.

Unfortunately, this won't work from C++ (since we communicate by file)
but I guess we need to accept that...

/Anders

> _______________________________________________
> Viper-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/viper-dev

---

From: Ola Skavhaug <[email-masked]>
Date: Tue, 29 May 2007 18:35:13 +0200

> but I guess we need to accept that...

What about the second solution? The only problem then would be to keep the
python-interpreter alive between to calls. I could then store a module-level
reference to p, and in that case use:

plot(u0, "noninteractive")
update(u1)

What do you think?

Ola

---

From: Anders Logg <[email-masked]>
Date: Tue, 29 May 2007 18:59:47 +0200

> plot(u0, "noninteractive")

Sounds good, but do we keep the Python interpreter alive?

/Anders

---

From: Ola Skavhaug <[email-masked]>
Date: Tue, 29 May 2007 19:37:32 +0200

> Sounds good, but do we keep the Python interpreter alive?

You should know; you implemented the C++-bindings :)

Ola

---

From: Anders Logg <[email-masked]>
Date: Tue, 29 May 2007 23:29:26 +0200

> You should know; you implemented the C++-bindings :)

The way I implemented the C++ bindings, I don't see how to do it.

/Anders