diff --git a/lisp/org-plot.el b/lisp/org-plot.el index f082c5d61..1732ef0c9 100644 --- a/lisp/org-plot.el +++ b/lisp/org-plot.el @@ -580,6 +580,10 @@ line directly before or after the table." (dolist (pair org-plot/gnuplot-default-options) (unless (plist-member params (car pair)) (setf params (plist-put params (car pair) (cdr pair))))) + ;; Collect options. + (save-excursion (while (and (equal 0 (forward-line -1)) + (looking-at "[[:space:]]*#\\+")) + (setf params (org-plot/collect-options params)))) ;; collect table and table information (let* ((data-file (make-temp-file "org-plot")) (table (let ((tbl (org-table-to-lisp))) @@ -587,7 +591,7 @@ line directly before or after the table." ('y t) ('yes t) ('t t)) - (if (memq 'hline tbl) + (if (not (memq 'hline tbl)) (setq tbl (apply #'cl-mapcar #'list tbl)) ;; When present, remove hlines as they can't (currentily) be easily transposed. (setq tbl (apply #'cl-mapcar #'list