On 7/25/10 3:49 PM, Maurizio wrote:
hi all, I was trying to animate a plot, with only few frames (50). I get a very slow animate:from numpy import linspace t_vec = linspace(0,Tn,50) L = Graphics() v = [] tp = [] Xp = [] Yp = [] for tn in t_vec: tp.append(tn) Xp.append(X.subs(val_dict).subs(t = tn)) Yp.append(Y.subs(val_dict).subs(t = tn)) L += list_plot(zip(Xp,Yp), plotjoined = True) v.append(L) Xmin = min(Xp) Xmax = max(Xp) Ymin = min(Yp) Ymax = max(Yp) a = animate(v, xmin = Xmin, xmax = Xmax, ymin = Ymin, ymax = Ymax) timeit('a.show()', repeat = 1) 5 loops, best of 1: 12 s per loop is this expected?
Animate usually seems this slow to me. It launches an operating system program after generating all the images, etc.
They are working on a nice animation framework in matplotlib itself, so hopefully in the near future (6 months??) animations will be much easier and faster.
Thanks, Jason -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
