Source

eugnuplot / example1.ex

Full commit
include "gnuplot_i.e"

constant DISPLAY = getenv("DISPLAY")
if atom( DISPLAY ) then
    sequence cmd = command_line()
    printf( 2, "usage: DISPLAY=0 eui %s\n", {cmd[2]} )
    abort( 0 )
end if

gnuplot_ctrl g = gnuplot_init()

gnuplot_cmd( g, "set terminal png" )
gnuplot_cmd( g, "set output \"sine.png\"" )
gnuplot_plot_equation( g, "sin(x)", "Sine wave" )

gnuplot_close( g )