From 931a14438759b4ac004899b0d32667f063992518 Mon Sep 17 00:00:00 2001 From: "D. LoBraico" Date: Mon, 18 Mar 2013 17:45:11 -0500 Subject: [PATCH 1/2] * mu-guile: allow passing extra options to gnuplot in mu:plot-histogram --- guile/mu/plot.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guile/mu/plot.scm b/guile/mu/plot.scm index 6ec982cd..5f8461aa 100644 --- a/guile/mu/plot.scm +++ b/guile/mu/plot.scm @@ -46,7 +46,7 @@ not found." progpath #f)))) 2 -(define* (mu:plot-histogram data title x-label y-label #:optional (text-only #f)) +(define* (mu:plot-histogram data title x-label y-label #:optional (text-only #f) (extra-gnuplot-opts '())) "Plot DATA with TITLE, X-LABEL and X-LABEL. If TEXT-ONLY is true, display using raw text, otherwise, use a graphical window. DATA is a list of cons-pairs (X . Y)." @@ -57,11 +57,12 @@ list of cons-pairs (X . Y)." (gnuplot (open-pipe "gnuplot -p" OPEN_WRITE))) (display (string-append "reset\n" - "set term " (if text-only "dumb" "wxt") "\n" + "set term " (if text-only "dumb" "qt") "\n" "set title \"" title "\"\n" "set xlabel \"" x-label "\"\n" "set ylabel \"" y-label "\"\n" "set boxwidth 0.9\n" + (string-join extra-gnuplot-opts "\n") "plot \"" datafile "\" using 2:xticlabels(1) with boxes fs solid\n") gnuplot) (close-pipe gnuplot))) From dc640728a39d809ac1287152bfa49eeedb3cab4a Mon Sep 17 00:00:00 2001 From: "D. LoBraico" Date: Mon, 18 Mar 2013 17:46:21 -0500 Subject: [PATCH 2/2] * mu-guile: resets default term to wxt (accidentally changed to qt) --- guile/mu/plot.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guile/mu/plot.scm b/guile/mu/plot.scm index 5f8461aa..99176db5 100644 --- a/guile/mu/plot.scm +++ b/guile/mu/plot.scm @@ -57,7 +57,7 @@ list of cons-pairs (X . Y)." (gnuplot (open-pipe "gnuplot -p" OPEN_WRITE))) (display (string-append "reset\n" - "set term " (if text-only "dumb" "qt") "\n" + "set term " (if text-only "dumb" "wxt") "\n" "set title \"" title "\"\n" "set xlabel \"" x-label "\"\n" "set ylabel \"" y-label "\"\n"