proposal to cut out plot2d_ps



Forgive me if this is wrong. I am just starting to try to understand
the code.

I looked at the file 'plot.lisp' and it seemed that the only place 
plot2d_ps is used is to actually do the ps output of plot2d.

In the lines right before the openmath option. The relevant code is
here.

  (defun $plot2d (fun &optional range &rest options)
   (let (($numer t)
         ($display2d nil)
         (*plot-realpart* *plot-realpart*)
         (i 0)
         ($plot_options $plot_options)
         plot-format gnuplot-term gnuplot-out-file file plot-name)
     (dolist (v options)
       ($set_plot_option v))

     (setq *plot-realpart* ($get_plot_option '$plot_realpart 2))
     (when (and (consp fun) (eq (cadr fun) '$parametric))
       (or range (setq range (nth 4 fun)))
       (setf fun `((mlist) ,fun)))
     (when (and (consp fun) (eq (cadr fun) '$discrete))
       (setf fun `((mlist) ,fun)))
     (when (eq ($get_plot_option '$plot_format 2) '$ps)
       (return-from $plot2d (apply '$plot2d_ps fun range options)))
     (when (eq ($get_plot_option '$plot_format 2) '$openmath)
       (return-from $plot2d (apply '$plot2dopen fun range options)))

It is also referenced in the file
   ./interfaces/emacs/emaxima/maxima-font-lock.el
and some doc files and, the /share/builtins-list.txt file

So, won't one have to rewrite the ps output option to plot2d if plot2d_ps is
removed?

Also, I don't see that removing 'plot2d_ps' from
'plot.lisp' will do much to clean up the plot.lisp routines.

Or, are you simply suggesting that it be removed from the manual, and
the set of user available functions, but be kept in the plot.lisp
file?

-sen


  ---------------------------------------------------------------------------
  | Sheldon E. Newhouse            |    e-mail: sen1 at math.msu.edu           |
  | Mathematics Department         |       				   |
  | Michigan State University      | telephone: 517-355-9684                |
  | E. Lansing, MI 48824-1027 USA  |       FAX: 517-432-1562                |
  ---------------------------------------------------------------------------

On Sun, 28 Jan 2007, Robert Dodier wrote:

> Hello,
>
> There is a function plot2d_ps which creates a Postscript plot.
> The file is constructed by code in src/plot.lisp; no external package
> such as Gnuplot or anything else is called. Here is an example:
> http://maxima.sourceforge.net/misc/plot2d_ps_example.ps
>
> I propose that we cut out plot2d_ps and related functions.
>
> (1) The plot is very plain; plot2d_ps does not make a title, legend,
> or axis labels.
>
> (2) Gnuplot makes nicer Postscript plots.
>
> (3) plot2d_ps does not recognize parametric or discrete plots,
> and does not recognize multiple curves to plot.
> (plot2d with Gnuplot PS output can handle all of those things.)
>
> (4) Equipping plot2d_ps to be at least as nice as Gnuplot
> would be quite a lot of work. If we must have a built-in Postscript
> plot capability (and I'm not convinced of that), we are better off
> importing some 3rd party library to do it.
>
> (5) The Maxima plotting code is messy. Cutting out plot2d_ps
> would be a substantial step towards cleaning it up.
>
> Comments?
>
> Robert
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>