From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-plot histogram bug when the x-axis labels could be interpreted as numbers Date: Sat, 17 Jan 2009 09:01:12 +0100 Message-ID: <4F4DF283-A073-4248-B156-665A6AEA7E02@uva.nl> References: <41c818190901140849xf500eadye6b476dd7f2aad2e@mail.gmail.com> <87y6xd7fwp.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LO6F4-0001H7-KZ for emacs-orgmode@gnu.org; Sat, 17 Jan 2009 03:09:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LO6F4-0001Gs-16 for emacs-orgmode@gnu.org; Sat, 17 Jan 2009 03:09:18 -0500 Received: from [199.232.76.173] (port=39654 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LO6F3-0001Gj-Ty for emacs-orgmode@gnu.org; Sat, 17 Jan 2009 03:09:17 -0500 Received: from mx20.gnu.org ([199.232.41.8]:52087) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LO6F3-0006FK-CQ for emacs-orgmode@gnu.org; Sat, 17 Jan 2009 03:09:17 -0500 Received: from mail-ew0-f15.google.com ([209.85.219.15]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LO6F2-00084u-Pm for emacs-orgmode@gnu.org; Sat, 17 Jan 2009 03:09:17 -0500 Received: by ewy8 with SMTP id 8so45136ewy.18 for ; Sat, 17 Jan 2009 00:09:14 -0800 (PST) In-Reply-To: <87y6xd7fwp.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org Applied, thanks. - Carsten On Jan 14, 2009, at 10:10 PM, Eric Schulte wrote: > Charles Sebold 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. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode