aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/org/org-plot.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/org-plot.el')
-rw-r--r--lisp/org/org-plot.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el
index c5f4bff24fa..10722403f7e 100644
--- a/lisp/org/org-plot.el
+++ b/lisp/org/org-plot.el
@@ -206,18 +206,18 @@ manner suitable for prepending to a user-specified script."
206 (y-labels (plist-get params :ylabels)) 206 (y-labels (plist-get params :ylabels))
207 (plot-str "'%s' using %s%d%s with %s title '%s'") 207 (plot-str "'%s' using %s%d%s with %s title '%s'")
208 (plot-cmd (case type 208 (plot-cmd (case type
209 ('2d "plot") 209 (2d "plot")
210 ('3d "splot") 210 (3d "splot")
211 ('grid "splot"))) 211 (grid "splot")))
212 (script "reset") plot-lines) 212 (script "reset") plot-lines)
213 (flet ((add-to-script (line) (setf script (format "%s\n%s" script line)))) 213 (flet ((add-to-script (line) (setf script (format "%s\n%s" script line))))
214 (when file ;; output file 214 (when file ;; output file
215 (add-to-script (format "set term %s" (file-name-extension file))) 215 (add-to-script (format "set term %s" (file-name-extension file)))
216 (add-to-script (format "set output '%s'" file))) 216 (add-to-script (format "set output '%s'" file)))
217 (case type ;; type 217 (case type ;; type
218 ('2d ()) 218 (2d ())
219 ('3d (if map (add-to-script "set map"))) 219 (3d (if map (add-to-script "set map")))
220 ('grid (if map 220 (grid (if map
221 (add-to-script "set pm3d map") 221 (add-to-script "set pm3d map")
222 (add-to-script "set pm3d")))) 222 (add-to-script "set pm3d"))))
223 (when title (add-to-script (format "set title '%s'" title))) ;; title 223 (when title (add-to-script (format "set title '%s'" title))) ;; title
@@ -243,7 +243,7 @@ manner suitable for prepending to a user-specified script."
243 "%Y-%m-%d-%H:%M:%S") "\""))) 243 "%Y-%m-%d-%H:%M:%S") "\"")))
244 (unless preface 244 (unless preface
245 (case type ;; plot command 245 (case type ;; plot command
246 ('2d (dotimes (col num-cols) 246 (2d (dotimes (col num-cols)
247 (unless (and (equal type '2d) 247 (unless (and (equal type '2d)
248 (or (and ind (equal (+ 1 col) ind)) 248 (or (and ind (equal (+ 1 col) ind))
249 (and deps (not (member (+ 1 col) deps))))) 249 (and deps (not (member (+ 1 col) deps)))))
@@ -258,10 +258,10 @@ manner suitable for prepending to a user-specified script."
258 with 258 with
259 (or (nth col col-labels) (format "%d" (+ 1 col)))) 259 (or (nth col col-labels) (format "%d" (+ 1 col))))
260 plot-lines))))) 260 plot-lines)))))
261 ('3d 261 (3d
262 (setq plot-lines (list (format "'%s' matrix with %s title ''" 262 (setq plot-lines (list (format "'%s' matrix with %s title ''"
263 data-file with)))) 263 data-file with))))
264 ('grid 264 (grid
265 (setq plot-lines (list (format "'%s' with %s title ''" 265 (setq plot-lines (list (format "'%s' with %s title ''"
266 data-file with))))) 266 data-file with)))))
267 (add-to-script 267 (add-to-script
@@ -305,9 +305,9 @@ line directly before or after the table."
305 (setf params (org-plot/collect-options params)))) 305 (setf params (org-plot/collect-options params))))
306 ;; dump table to datafile (very different for grid) 306 ;; dump table to datafile (very different for grid)
307 (case (plist-get params :plot-type) 307 (case (plist-get params :plot-type)
308 ('2d (org-plot/gnuplot-to-data table data-file params)) 308 (2d (org-plot/gnuplot-to-data table data-file params))
309 ('3d (org-plot/gnuplot-to-data table data-file params)) 309 (3d (org-plot/gnuplot-to-data table data-file params))
310 ('grid (let ((y-labels (org-plot/gnuplot-to-grid-data 310 (grid (let ((y-labels (org-plot/gnuplot-to-grid-data
311 table data-file params))) 311 table data-file params)))
312 (when y-labels (plist-put params :ylabels y-labels))))) 312 (when y-labels (plist-put params :ylabels y-labels)))))
313 ;; check for timestamp ind column 313 ;; check for timestamp ind column