Search code examples
maxima

Maxima batch mode quits before plotting


I want to look at plots of Maxima when it's running with batch mode. However, Maxima quits too fast. Is there any way to "persist" like gnuplot?

My environment is: Ubuntu 14.04 64bit, Maxima 5.32.1.

sin.max

plot2d(sin(x),[x,0,2*%pi]);

Terminal:

$ maxima -b sin.max # It ends too fast!

Solution

  • You can make Maxima pause until key-press with a call to readline():

    sin.max

    plot2d(sin(x), [x,0,2*%pi]);
    readline(?\*standard\-input\*);