#1238 plot2d tries to plot no-numbers

closed
nobody
5
2008-12-25
2007-07-20
andreas
No

if you try to plot a symbolic function, plot2d generates an empty plot (which can take very long for complicated function, and interrupting will spoil maxima, so that one has to restart). This is a bit annoying. Typing:

(%i1) f(x):=a*x;
(%o1) f(x) := a x
(%i2) plot2d(f(x),[x,0,5]);

will give you a plot even if 'a' is undefined. I think this is a Bug and not a feature.

Discussion

  • andreas
    andreas
    2007-07-20

    Logged In: YES
    user_id=1843050
    Originator: YES

    sorry, forgot :
    -------------------------------------------------------------

    Maxima version: 5.12.0
    Maxima build date: 15:58 6/6/2007
    host type: i686-redhat-linux-gnu
    lisp-implementation-type: GNU Common Lisp (GCL)
    lisp-implementation-version: GCL 2.6.7

    -------------------------------------------------------------

     
  • Robert Dodier
    Robert Dodier
    2008-12-25

    Resolved at least in part by r1.133 src/plot.lisp: now plot2d prints a warning message if some or all of the values are non-numeric, and doesn't open the plot window if they are all non-numeric.

    With r1.133 src/plot.lisp, the example shown above plot2d(a*x, [x, 0, 5]) does have 1 numeric value (namely 0) so it does open the plot window (showing 1 point). At least the warning message is printed. Maybe plot2d should try harder. I'll leave that for another revision.

    Closing this report as fixed.

     
  • Robert Dodier
    Robert Dodier
    2008-12-25

    • status: open --> closed