#942 Gnuplot dumb terminal output not captured by xmaxima

closed
nobody
5
2012-12-04
2006-06-08
No

In Xmaxima (5.9.3cvs / GCL 2.6.7, SBCL 0.9.9, Clisp
2.34 / Linux, and *maybe* also 5.9.3 / GCL 2.6.7 / Win
XP), Gnuplot dumb terminal output is not captured.

plot2d (sin(x), [x, 0, %pi], [gnuplot_term, dumb]);

shows nothing in Xmaxima, and on Linux at least, the
xterm from which Xmaxima was launched shows the output.

Running Maxima from an xterm shows the dumb terminal
output in the xterm as expected (an ascii art sine wave).

Dunno for sure if this same problem is exhibited by
Xmaxima 5.9.3 / GCL 2.6.7 / Win XP. The dumb terminal
output goes missing, but I don't know if that is the
same bug or a different one, because dumb terminal
output is lost in a Maxima command prompt window.

Fixing the gnuplot dumb terminal output is no pressing
problem, but I'm pretty sure that the problem is that
gnuplot is writing an output stream which is not
redirected by Xmaxima; that seems like a somewhat more
general problem.

Discussion

  • Volker van Nek

    Volker van Nek - 2006-06-10

    Logged In: YES
    user_id=1269745

    Here Robert,
    here is what i have written to the mailing list yesterday.
    this is specially for Windows.

    1. terminal 'dumb' already works in Windows console maxima

    plot2d( sin(x), [x,0,2*%pi], [gnuplot_term,dumb],
    [gnuplot_out_file, "D:/test.txt"] ); --> dumb plot

    Remark: The dumb plot character is $, with using gnuplot
    directly it is a *. Reason?

    2. with xmaxima

    system("type D:/test.txt"); --> NO dumb plot (from the
    formerly created file)
    system("type D:\\test.txt"); --> NO dumb plot

    3. with console maxima and xmaxima

    printfile("D:/test.txt"); --> dumb plot

    4. plot.lisp lines 1122 ...

    ($dumb
    (if gnuplot-out-file
    ;;($system (format nil $viewtext_command
    view-file))
    ($printfile view-file) ;; fix
    ;;($system (format nil "~a \"~a\""
    $gnuplot_command file)))))) ;; should be replaced
    by (merror ... )
    (print (format nil "~a \"~a\"" $gnuplot_command
    file)))))) ;; for testing

    which WORKS in console maxima and xmaxima

    plot2d( sin(x), [x,0,2*%pi], [gnuplot_term,dumb],
    [gnuplot_out_file, "D:/test.txt"] ); --> dumb plot

    5.
    plot2d( sin(x), [x,0,2*%pi], [gnuplot_term,dumb] ); -->
    "wgnuplot \"C:/Dokumente und Einstellungen/van
    Nek/maxout.gnuplot\""

    system("wgnuplot \"C:/Dokumente und Einstellungen/van
    Nek/maxout.gnuplot\"");

    doesn't work, because maxout.gnuplot misses a line for the
    out file (set out 'myfile')

    Suggestion:
    If [gnuplot_term,dumb] is set, there should be an error
    message if there is no output file.

    Volker

     
  • Volker van Nek

    Volker van Nek - 2006-06-10

    Logged In: YES
    user_id=1269745

    Robert,
    I want to be more precise concerning the last point.
    If I type in wgnuplot

    set term dumb
    pl [0:1] x

    the dumb plot appears in the wgnuplot console itself.
    In a batch process this is not possible, because the in
    batch mode the gnuplot console doesn't pop up.

    I wonder why it works in Linux. It seems that gnuplot itself
    behaves different in Windows and Linux and so we need a
    slightly different conception for dumb plotting with gnuplot
    from Maxima.

    Practically a Windows user must define an out file to get
    the dumb plot. So the else clause in
    (if gnuplot-out-file
    must return an error message.

     
  • Robert Dodier

    Robert Dodier - 2006-07-08
    • milestone: --> To_be_reviewed
     
  • Robert Dodier

    Robert Dodier - 2006-07-08

    Logged In: YES
    user_id=501686

    Some changes have been committed to src/plot.lisp recently
    which might address this problem. I have already retested on
    Linux and behavior is unchanged. Need to verify on Windows.

     
  • Vadim V. Zhytnikov

    • status: open --> closed
     
  • Vadim V. Zhytnikov

    Logged In: YES
    user_id=366498
    Originator: NO

    The problem fixed in Maxima 5.10.0 on all platforms.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks