Hello Aur?lien
> when there's more than 5000points to plot the waiting
> time on my computer (sempron 3ghz, 512ram, xp sp2)
> is about 20 minutes [...]
OK, in looking at the plotting code, it looks like it spends a
lot of time constructing a label (by concatenating all of the data
into a string) which is never used. I have committed a revision
of plot.lisp which avoids the unneeded label construction. See:
http://maxima.cvs.sourceforge.net/maxima/maxima/src/plot.lisp
Click the "download" link to get a copy and within Maxima
load("plot.lisp"); to bring it into Maxima.
I find that the new version is much faster for plot2d([discrete, ...])
when there are many data.
By the way it makes an interesting picture -- maybe you
can tell us more about your problem domain.
HTH
Robert Dodier
PS. Here is my version of your script:
Differences: call tree_reduce instead of looping over append;
set gnuplot_curve_styles to plot discrete points.
showtime : true;
debut:-10;
fin:10;
nb_pts:5000;
eqn_temp(t):=4+(t-2)*x+(t^3-8)*x^2+(t^2-t+4)*x^3;
f(x):=[realpart(ev(rhs(x),numer)),imagpart(ev(rhs(x),numer))];
pas:(fin-debut)/nb_pts;
eqn(t):=eqn_temp(debut+pas*t);
equations:makelist(eqn(t),t,0,nb_pts)$
resul:map(allroots,equations)$
resultats : tree_reduce (append, resul)$
aplotter:map(f,resultats)$
load ("src/plot.lisp");
plot2d ([discrete, aplotter], [gnuplot_curve_styles, ["with points"]]);