various plot2d issues



On Wed, 2007-04-04 at 13:34 -0600, Robert Dodier wrote:
> > but these are no-ops (no plot appears at all):
> >
> >    plot2d('( if x<1 or x>2 then sin(x) else 'und), [x,0,3]);
> >    plot2d( lambda([x],if x<1 or x>2 then sin(x) else 'und),
> [x,0,3]);
> 
> Maxima makes a title for Gnuplot via stringout(expr) and the
> presence of the single quote confuses Gnuplot. Probably any
> generated strings should be quoted or sanitized somehow.

Ooops, I was just blaming coerce-float-fun for that in a previous
message. The two commands above work OK for me; the single quotes
are passed inside double quotes, so the version of gnuplot that
I have has no problem with them.

In any case, I was already thinking of sanitizing the strings for
Gnuplot because of a related issue: if an "enhanced" terminal
is defined in Gnuplot, thinks like e^{sin(x_1)} will be nicely
typeset; however, the string sent by Maxima (%e^(sin(x[1])) will
look ugly. With some simple parsing of strings we could
make thinks look better.

By the way, does anybody have any objection to the moving of
all gnuplot related functions from plot.lisp to gnuplot.lisp?
That would make plot.lisp easier to maintain.

Regards,
Jaime