#1167 plot2d in very narrow range

closed
5
2008-07-01
2007-04-12
Stavros Macrakis
No

I was looking at the behavior of floating-point sin near %pi/2, so I did:

plot2d(sin(x),[x,1.57079628,1.570796326794897],
[nticks,1000]);

There are several problems with the result.
First of all, the x and y axes are labelled with only 5 digits of precision, so x goes from 1.5708 to 1.5708, and y goes from 1 to 1. Not very useful. Similarly, the coordinates shown in the bottom left have only 6 digits.

Secondly, about 5/6 of the way across the plot, there is a short line *outside* the plotting box. I don't know if this represents a value larger than the other values or some sort of plotting glitch.

Maxima 5.11.0 GCL Windows Gnuplot 4.0

Discussion

  • Logged In: YES
    user_id=588346
    Originator: YES

    nticks not necessary to evoke this bug

     
  • Robert Dodier
    Robert Dodier
    2007-06-29

    Logged In: YES
    user_id=501686
    Originator: NO

    It appears that the display generated by Maxima 5.12.0 is even less informative ... in 5.12.0 the vertical range of the display is 0.99 to 1.01 which is many orders of magnitude greater than the range of sin over [1.57079628, 1.570796326794897]. At least with 5.11.0 you get stair steps as expected.

    The range [0.99, 1.01] might be imposed by Gnuplot (5.12.0 ships with Gnuplot 4.1, 5.11.0 ships with 4.0), or it might be imposed by Maxima, dunno which.

     
  • Robert Dodier
    Robert Dodier
    2008-07-01

    Logged In: YES
    user_id=501686
    Originator: NO

    Line outside the box not observed in 5.15.0cvs + Clisp + Gnuplot 4.0.0 + Linux.

    Line outside the box is observed in 5.15.0 + GCL + Gnuplot 4.2.3 + Windows XP.

    In fact, when the same Gnuplot script is rendered on Windows (i.e. the maxout.gnuplot file created when plot_format is gnuplot) the extraneous line is shown on Windows, and not shown on Linux. I conclude this is a Windows-specific bug in Gnuplot.

    The problem with labels mentioned here is a bug in Gnuplot; it should be smarter about constructing the label text. I don't think we should try to work around it.

    Closing this report as "won't fix" since the problems are in Gnuplot. I have submitted bug reports to the Gnuplot project for these.

     
  • Robert Dodier
    Robert Dodier
    2008-07-01

    • status: open --> closed