Plotting issues



>>>>> "Raymond" == Raymond Toy <toy@rtp.ericsson.se> writes:

    Raymond> Several issues about plotting follow.

    Raymond> In bug 552724 there is an example plot:

    Raymond>         plot2d([5-x^2,x+3],[x,-2,1]); 

    Raymond> With both openmath, the range of y is limited to -3 to +3 by the plot
    Raymond> options.  I think this is a bug.  We shouldn't limit the y range unless
    Raymond> specifically told to.

I've changed this so the default limit is arbitrarily
most-positive-double-float/1024.  Using plain
most-positive-double-float cuases overflows in draw2d, so I used some
smaller number.

    Raymond> If I specify 

    Raymond>         plot2d([5-x^2],[x,-2,1],[y,-5,5])

    Raymond> this produces the desired openmath plot.  However, if I want to use
    Raymond> gnuplot, the command

    Raymond>         plot2d([5-x^2],[x,-2,1],[y,-5,5,plot_format,gnuplot])

    Raymond> produces an error because maxima wants just 2 items after y. I think
    Raymond> this is a bug.  Making plot_format come first fixes this.  I think we
    Raymond> should really specify the y option as y,[-5,5] instead of y,-5,5.

How embarrasing!  plot2d takes many separate option parameters so this
is supposed to be like

        plot2d([5-x^2],[x,-2,1],[y,-5,5],[plot_format,gnuplot])

which works.  No changes need to be made.

    Raymond> Also, if you use gnuplot, no plot is actually produced.  I think the
    Raymond> reason is that what maxima writes out includes lines like

    Raymond>         move x y

    Raymond> where x and y are numbers.  These aren't valid gnuplot values, so I
    Raymond> think gnuplot just gives up.  I have a hack to not print these lines,

For now, I just disable printing of these lines when the plot format
is gnuplot.

    Raymond> Finally, it's impossible for the average person to figure out how to
    Raymond> use plot2d because describe just says:

    Raymond>          - Function: PLOT2D (expr,range,...,options,..)

The info file contains the information, but describe doesn't seem to
want to display it.  I'll have to look into this.

Ray