Maxima-Gnuplot interface



James Amundson ÐÉÛÅÔ:
> I have just checked in the new Maxima-Gnuplot interface. Examples can be
> seen on <http://maxima.sourceforge.net/maxgraphtmp>;. (As the url
> implies, we'll make the page official later.)
> 
> The following notes will be converted into real documentation after I
> have received some feedback on the interface.
> 
> --
> 1) Goal: the idea is not to create the ultimate plotting tool for
> Maxima. Rather, I have tried to make the maximum functionality available
> with the currently available tool (Gnuplot) and minimal effort. Simple
> operations should be easy and complex operations should be possible.
> 
> 2) (New) "gnuplot" is now the default plotting format. The old gnuplot
> interface that utilizes the mgnuplot tcl-tk script is available as
> "mgnuplot". The old default maxima plotting package is still available
> as "openmath".
> 
> 3) Three gnuplot terminals are available: default, ps and dumb. Each can
> either be displayed to the screen or saved to a file.
> 
> 4) Several new plot_options are available:
>   a) gnuplot_term = default, ps or dumb. default is default.
>   b) gnuplot_out_file = false or filename. false is default. Output
> files are gnuplot format to be loaded in the gnuplot application for the
> default term, encapsulated postscript for the ps term and text for the
> dumb term.
>   c) gnuplot_pm3d = true or false. false is default. Turns on the pm3d
> option available in newer versions of Gnuplot.
>   d) gnuplot_preamble = string. "" is default. The preamble can contain
> an arbitrary string of Gnuplot commands. Multiple commands should be
> separated with semi-colons.
>   e) gnuplot_curve_titles = list of (strings or default). [default] is
> default.  The list of curve titles will be applied to the list of
> curves. If there are more curves than titles in the list, the list will
> wrap around. The special value default give the curves titles based on
> the 1d representation of the function name.
>   f) gnuplot_curve_styles = list of strings. The styles wrap around in a
> manner similar to the titles. The strings themselves should be gnuplot
> commands appropriate for 
> 	plot "file" with title "title <style>
> For details type "help plot" in gnuplot.
>   g) gnuplot_default_term_command = string. Default is "". The gnuplot
> command to set the default terminal.
>   h) gnuplot_ps_term_command = string. Default is "set size 1.5, 1.5;set
> term postscript eps enhanced color solid 24". The gnuplot command to set
> the ps terminal.
>   g) gnuplot_default_term_command = string. Default is "set term dumb 79
> 22". The gnuplot command to set the dumb terminal.
> 
> 5) More testing needs to be done, particularly with xmaxima and windows.
> 
> Feedback on this interface will be greatly appreciated. This is the last
> feature I plan to add before working on the 5.9.1 release.
> 
> --Jim
> 

Vary good!

I've tried new gnuplot plotting on both Linux and Windows XP.  Works 
fine especially in conjunction with gnuplot 4.0.0 released yesterday.
I can only confirm two glitches reported by Valery.

1) plot2d(cot(x),[x,-2*%pi,2*%pi]);

produces Zero-Divisor lisp error on GCL (clisp, sbcl and cmucl are OK).

2) last example

plot3d(cos(-x^2+y^3/4),[x,-4,4],[y,-4,4],[gnuplot_preamble,"set view 
map;unset surface"],[grid,150,150]);

makes empty box with gnuplot 4.0.0.

1) - is not new plotting scheme bug but anyway worth fixing before release.

2) - probably not maxima but rather gnuplot bug



-- 
      Vadim V. Zhytnikov

       <vvzhy@mail.ru>
      <vvzhy@netorn.ru>