emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] org-plot histogram bug when the x-axis labels could be int


From: Carsten Dominik
Subject: Re: [Orgmode] org-plot histogram bug when the x-axis labels could be interpreted as numbers
Date: Sat, 17 Jan 2009 09:01:12 +0100

Applied, thanks.

- Carsten

On Jan 14, 2009, at 10:10 PM, Eric Schulte wrote:

Charles Sebold <address@hidden> writes:

On 14 Jan 2009, William Henney wrote:

From glancing through org-plot.el, it seems as though the problem is
that the text-ind parameter is false when all the values in the
"independent variable" column are legal numbers. However, my lisp
skills are not up to fixing this.

This may fix that problem, but I don't know that it doesn't produce a
nest of bigger ones. Eric should look at this first. This seems to me
to be useful enough when producing histograms.


Hi,

I believe that forcing text-ind to be true when the plot type is 'hist'
is a safe enough maneuver (especially plotting with hist seems to fail
if text-ind is not true).

I would recommend this patch.  It's the same idea as Charles' only
implemented in a different place.

Thanks -- Eric

diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 7efd84a..1792d50 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -316,12 +316,13 @@ line directly before or after the table."
                           (mapcar (lambda (row) (nth ind row)) table)))) 0)
              (plist-put params :timeind t)
            ;; check for text ind column
-           (if (> (length
-                   (delq 0 (mapcar
-                            (lambda (el)
-                              (if (string-match org-table-number-regexp el)
-                                  0 1))
-                            (mapcar (lambda (row) (nth ind row)) table)))) 0)
+           (if (or (string= (plist-get params :with) "hist")
+                   (> (length
+                       (delq 0 (mapcar
+                                (lambda (el)
+                                  (if (string-match org-table-number-regexp el)
+                                      0 1))
+                                (mapcar (lambda (row) (nth ind row)) table)))) 
0))
                (plist-put params :textind t)))))
      ;; write script
      (with-temp-buffer


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





reply via email to

[Prev in Thread] Current Thread [Next in Thread]