From dd83c235cb104a2c286dd251347a35d2632efd02 Mon Sep 17 00:00:00 2001 From: djcb Date: Mon, 14 Oct 2013 22:44:11 +0300 Subject: [PATCH] guile: minor updates --- guile/mu-guile.texi | 3 +-- guile/mu/plot.scm | 14 +++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/guile/mu-guile.texi b/guile/mu-guile.texi index 83ff0b59..7aff20f5 100644 --- a/guile/mu-guile.texi +++ b/guile/mu-guile.texi @@ -876,8 +876,7 @@ exec guile -s $0 $@ (tm:hour (localtime (mu:date msg))))) (lambda (x y) (< (car x) (car y))))) -(mu:plot-histogram (mail-per-hour-table) "Mail per hour" "Hour" "Frequency" -#t) +(mu:plot-histogram (mail-per-hour-table) "Mail per hour" "Hour" "Frequency") @end lisp @cartouche diff --git a/guile/mu/plot.scm b/guile/mu/plot.scm index ce5ea691..04181352 100644 --- a/guile/mu/plot.scm +++ b/guile/mu/plot.scm @@ -46,16 +46,20 @@ not found." progpath #f)))) -(define* (mu:plot-histogram data title x-label y-label output - #:optional (extra-gnuplot-opts '())) +(define* (mu:plot-histogram data title x-label y-label + #:optional (output "dumb") (extra-gnuplot-opts '())) "Plot DATA with TITLE, X-LABEL and X-LABEL using the gnuplot -program. DATA is a list of cons-pairs (X . Y). OUTPUT is a string +program. DATA is a list of cons-pairs (X . Y). + + OUTPUT is a string that determines the type of output that gnuplot produces, depending on the system. Which options are available depends on the particulars for the gnuplot installation, but typical examples would be \"dumb\" for text-only display, \"wxterm\" to write to a graphical window, or -\"png\" to write a PNG-image to stdout. EXTRA-GNUPLOT-OPTS are any -additional options for gnuplot." +\"png\" to write a PNG-image to stdout. + +EXTRA-GNUPLOT-OPTS is a list +of any additional options for gnuplot." (if (not (find-program-in-path "gnuplot")) (error "cannot find 'gnuplot' in path")) (let ((datafile (export-pairs data))