gnuplot quits automatically



On Fri, 2011-09-09 at 08:52 +0800, RLP wrote:

> > The following code comes from manuals, It works except
> > that the pop-up gnuplot window will quit immediately as soon as the
> > mouse begins to move.
> > 
> > So, How to prevent gnuplot from quitting?
> > 
> > ==== code ====
> > -->  load(implicit_plot);
> > -->  implicit_plot ([y^2=x, x*y^2-3*x*y+y+x^3-x^2+x=0] , [x, 1, 10],
> > [y, 0, 10], [gnuplot_preamble, "set zeroaxis"]);
> > ==============

Hi Xiang,
you've found a bug in implicit_plot: it has failed to obtain any points
in the region [x, 1, 10], [y, 0, 10] that satisfy the relation
x*y^2-3*x*y+y+x^3-x^2+x=0 and instead of skiping that part,
implicit_plot is sending a non-numeric output to Gnuplot.

For the time being, until the bug is fixed, you can try changing the
domain. For instance, the following should work for you:

implicit_plot ([y^2=x, x*y^2-3*x*y+y+x^3-x^2+x=0], [x,-1,10],
[y,-1,10]);

Notice that in recent versions of Maxima there is no need for "set
zeroaxis", since the axes will be shown by default. If you wanted
Gnuplot not to show the axes, the preferred way would be to add the
option [axes, false].

"gnuplot_preamble" is a very buggy option that should be avoided; you
should better use one of the options listed in "Plotting Options" (type
"? Plotting Options" in Maxima, or look them up in the manual).

Best regards,
Jaime