From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Sebold Subject: Re: org-plot histogram bug when the x-axis labels could be interpreted as numbers Date: Wed, 14 Jan 2009 14:15:05 -0600 Message-ID: References: <41c818190901140849xf500eadye6b476dd7f2aad2e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNC91-0003ND-6p for emacs-orgmode@gnu.org; Wed, 14 Jan 2009 15:15:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNC8y-0003K7-58 for emacs-orgmode@gnu.org; Wed, 14 Jan 2009 15:15:18 -0500 Received: from [199.232.76.173] (port=57152 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNC8x-0003Jq-Qw for emacs-orgmode@gnu.org; Wed, 14 Jan 2009 15:15:15 -0500 Received: from yw-out-1718.google.com ([74.125.46.157]:5710) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LNC8x-0003Si-Bw for emacs-orgmode@gnu.org; Wed, 14 Jan 2009 15:15:15 -0500 Received: by yw-out-1718.google.com with SMTP id 9so315110ywk.66 for ; Wed, 14 Jan 2009 12:15:09 -0800 (PST) In-Reply-To: <41c818190901140849xf500eadye6b476dd7f2aad2e@mail.gmail.com> (William Henney's message of "Wed\, 14 Jan 2009 10\:49\:43 -0600") 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: emacs-orgmode@gnu.org 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. diff --git a/lisp/org-plot.el b/lisp/org-plot.el index 7efd84a..01a8360 100644 --- a/lisp/org-plot.el +++ b/lisp/org-plot.el @@ -246,10 +246,12 @@ NUM-COLS controls the number of columns plotted in a 2-d plot." (setf plot-lines (cons (format plot-str data-file - (or (and (not text-ind) ind + (or (and (not (string= with "hist")) + (not text-ind) ind (> ind 0) (format "%d:" ind)) "") (+ 1 col) - (if text-ind (format ":xticlabel(%d)" ind) "") + (if (or (string= with "hist") text-ind) + (format ":xticlabel(%d)" ind) "") with (or (nth col col-labels) (format "%d" (+ 1 col)))) plot-lines))))) -- Charles Sebold 14th of January, 2009 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.17trans