diff --git a/lisp/org-plot.el b/lisp/org-plot.el index 283d993..3be1b2f 100644 --- a/lisp/org-plot.el +++ b/lisp/org-plot.el @@ -679,8 +679,8 @@ (defun org-plot/gnuplot (&optional params) tbl)) (num-cols (length (if (eq (nth 0 table) 'hline) (nth 1 table) (nth 0 table)))) - (type (assoc (plist-get params :plot-type) - org-plot/preset-plot-types)) + (type (cdr (assoc (plist-get params :plot-type) + org-plot/preset-plot-types))) gnuplot-script) (unless type @@ -691,17 +691,13 @@ (defun org-plot/gnuplot (&optional params) (setf params (plist-put params :labels (car table))) ; headers to labels (setf table (delq 'hline (cdr table)))) ; clean non-data from table - ;; Collect options. - (save-excursion (while (and (equal 0 (forward-line -1)) - (looking-at "[[:space:]]*#\\+")) - (setf params (org-plot/collect-options params)))) ;; Dump table to datafile (let ((dump-func (plist-get type :data-dump))) (if dump-func - (funcall dump-func table data-file num-cols params) + (funcall dump-func table data-file params num-cols) (org-plot/gnuplot-to-data table data-file params))) ;; Check type of ind column (timestamp? text?) - (when (plist-get params :check-ind-type) + (when (plist-get type :check-ind-type) (let* ((ind (1- (plist-get params :ind))) (ind-column (mapcar (lambda (row) (nth ind row)) table))) (cond ((< ind 0) nil) ; ind is implicit