# HG changeset patch # User Steve Losh # Date 1486384213 0 # Node ID 4d4ad6ac3bf637562e231a5d07ef844bec2ccd4f # Parent df57ee0487619fce7a00fe3b62a4bef1510c2233 More graphviz options diff -r df57ee048761 -r 4d4ad6ac3bf6 losh.lisp --- a/losh.lisp Sat Jan 21 12:27:33 2017 +0000 +++ b/losh.lisp Mon Feb 06 12:30:13 2017 +0000 @@ -2276,8 +2276,13 @@ (label-y) (line-title 'data) (line-width 4) + (smooth nil) (axis-x nil) (axis-y nil) + (min-x nil) + (max-x nil) + (min-y nil) + (max-y nil) (graph-title) (logscale-x nil) (logscale-y nil) @@ -2289,7 +2294,7 @@ " (flet ((esc (string) (remove #\' (aesthetic-string string))) - (f (&rest args) (apply #'format nil args))) + (f (&rest args) (apply #'format nil (substitute "" nil args)))) (gnuplot-args% (ccase output ((:x :x11) (f "set terminal x11 persist")) @@ -2307,8 +2312,11 @@ (when label-y (f "set ylabel '~A'" (esc label-y))) (when logscale-x (f "set logscale x")) (when logscale-y (f "set logscale y")) - (f "plot '-' using 1:2 title '~A' with ~(~A~) linewidth ~D" - (esc line-title) style line-width)))) + (f "set xrange [~A:~A]" min-x max-x) + (f "set yrange [~A:~A]" min-y max-y) + (f "plot '-' using 1:2 title '~A' with ~(~A~) linewidth ~D ~A" + (esc line-title) style line-width + (when smooth (f "smooth ~(~A~)" smooth)))))) (defun gnuplot (data