Skip to content

Commit

Permalink
guile: minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
djcb committed Oct 14, 2013
1 parent 020a13d commit dd83c23
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 1 addition & 2 deletions guile/mu-guile.texi
Expand Up @@ -876,8 +876,7 @@ exec guile -s $0 $@
(tm:hour (localtime (mu:date msg))))) (tm:hour (localtime (mu:date msg)))))
(lambda (x y) (< (car x) (car y))))) (lambda (x y) (< (car x) (car y)))))
(mu:plot-histogram (mail-per-hour-table) "Mail per hour" "Hour" "Frequency" (mu:plot-histogram (mail-per-hour-table) "Mail per hour" "Hour" "Frequency")
#t)
@end lisp @end lisp


@cartouche @cartouche
Expand Down
14 changes: 9 additions & 5 deletions guile/mu/plot.scm
Expand Up @@ -46,16 +46,20 @@ not found."
progpath progpath
#f)))) #f))))


(define* (mu:plot-histogram data title x-label y-label output (define* (mu:plot-histogram data title x-label y-label
#:optional (extra-gnuplot-opts '())) #:optional (output "dumb") (extra-gnuplot-opts '()))
"Plot DATA with TITLE, X-LABEL and X-LABEL using the gnuplot "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 that determines the type of output that gnuplot produces, depending on
the system. Which options are available depends on the particulars for the system. Which options are available depends on the particulars for
the gnuplot installation, but typical examples would be \"dumb\" for the gnuplot installation, but typical examples would be \"dumb\" for
text-only display, \"wxterm\" to write to a graphical window, or text-only display, \"wxterm\" to write to a graphical window, or
\"png\" to write a PNG-image to stdout. EXTRA-GNUPLOT-OPTS are any \"png\" to write a PNG-image to stdout.
additional options for gnuplot."
EXTRA-GNUPLOT-OPTS is a list
of any additional options for gnuplot."
(if (not (find-program-in-path "gnuplot")) (if (not (find-program-in-path "gnuplot"))
(error "cannot find 'gnuplot' in path")) (error "cannot find 'gnuplot' in path"))
(let ((datafile (export-pairs data)) (let ((datafile (export-pairs data))
Expand Down

0 comments on commit dd83c23

Please sign in to comment.