From: "Eric Schulte" <firstname.lastname@example.org>
Subject: Re: org-plot histogram bug when the x-axis labels could be interpreted as numbers
Date: Wed, 14 Jan 2009 13:10:14 -0800 [thread overview]
Message-ID: <email@example.com> (raw)
In-Reply-To: <firstname.lastname@example.org> (Charles Sebold's message of "Wed, 14 Jan 2009 14:15:05 -0600")
Charles Sebold <email@example.com> 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.
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
@@ -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
next prev parent reply other threads:[~2009-01-14 21:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 16:49 org-plot histogram bug when the x-axis labels could be interpreted as numbers William Henney
2009-01-14 20:15 ` Charles Sebold
2009-01-14 21:10 ` Eric Schulte [this message]
2009-01-15 0:18 ` Charles Sebold
2009-01-17 8:01 ` Carsten Dominik
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).