various plot2d issues



On 4/4/07, Robert Dodier <robert.dodier at gmail.com> wrote:
> On 4/4/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> > The number 1.0e308 seems to represent "missing value" for plot2d.
> What is the behavior that makes it appear that missing = 1e308?

I would guess this is in gnuplot.  Try

          plot2d([discrete,[[0,1],[1,2],[2,1e308],[3,4],[4,5]]]);
or
          plot2d([discrete,[[0,1],[1,2],[1e308,2],[3,4],[4,5]]]);

There is no line connecting [1,2] and [3,4], and the x/y-limits aren't
affected by the 1e308. On the other hand, with 1e300, the x/y limits
are huge and the line *is* drawn.

> > 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.

Phew!  I was worried there was some eval weirdness.  Yes, quoting the
strings seems like a good idea....

> ... if the nonnumeric value is NIL (false), treat the function
> as undefined there; otherwise, subdivide the plotting interval and
> reevaluate the expression, in hopes of finding some numeric
> values. The subdivide & reevaluate strategy was presumably
> arranged for isolated singularities.

Ah, yes, I remember a discussion about this a while ago.  I even
participated. Will have to think about this some more.

              -s