[Fwd: Re: [Maxima] Maxima-Gnuplot interface]



On Fri, 2004-04-16 at 13:17, James Amundson wrote:
> From: Barton Willis <willisb at unk>
> To: James Amundson <amundson@users.sourceforge.net>
> Cc: Maxima List <maxima@www.ma.utexas.edu>, maxima-admin@math.utexas.edu
> Subject: Re: [Maxima] Maxima-Gnuplot interface
> Date: Fri, 16 Apr 2004 09:43:26 -0500
> 
> The new Gnuplot interface works for me under Windows XP using both xmaxima 
> and 
> command-line Maxima; however it seems necessary to kill a plot before 
> Maxima will 
> allow a new user input.

Yes, that was the only way I could easily get it to work on windows.
Running gnuplot non-interactively turns out to be something of a trick.
Under unix(-like) systems, one can do
	gnuplot -persist foo.gp
Gnuplot will immediately return after processing foo.gp, but it will
leave the window it produced behind. That's the technique I used.

On windows, however, the -persist flag doesn't seem to do anything. The
best I could do was
	gnuplot foo.gp -
which tells gnuplot to read from standard input. The net result when
launched from Maxima is that gnuplot runs until the window is closed.

If someone were to write some more complex code to interact with gnuplot
over pipes we could have more sensible window handling code on both
platforms. Gnuplot 4.0 has the ability to interact with the mouse to
rotate plots. It doesn't work that way with the -persist option, but it
should be possible by utilizing pipes. I hope we can get around to
implementing such an approach in the future.

If someone has a better idea for interacting with gnuplot, I'd love to
hear it. 

--Jim