From: Michael Heerdegen <michael_heerdegen@web.de>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: Plotting a table of date+time pairs
Date: Wed, 04 Dec 2024 11:50:40 +0100 [thread overview]
Message-ID: <87ser3pvr3.fsf@web.de> (raw)
In-Reply-To: <87iks2qnr1.fsf@ucl.ac.uk> (Eric Fraga's message of "Mon, 2 Dec 2024 12:21:22 +0000")
"Fraga, Eric" <e.fraga@ucl.ac.uk> writes:
> > I now have one remaining problem: my time values in the second column
> > contain the name of the time zone - the purpose is to flag the time as
> > summer or winter time. Currently I need to remove these indicators from
> > the table, else plotting fail, gnuplot doesn't understand the data.
>
> You can specify the format of dates/times in gnuplot and then manipulate
> them. See "time/date specifiers" in the gnuplot info manual and also
> read about the strptime() function. I don't have any examples of these
> at hand unfortunately.
Yes thanks - but I really think Org gets it wrong. Look:
With
| plot data using 1:(timecolumn(2,"%H:%M") ...
gnuplot happily accepts a data file looking like
| 2024-09-18 11:40 CEST
| 2024-09-19 11:27 CEST
| ... ...
It just discards the timezone which is good enough. No problem with the
kind of data for gnuplot (AFAIR I read in the gnuplot manual that time
zones are not supported ad-hoc - anyway, I don't need this for
plotting.)
But the real problem is that the org table export mechanism thinks that
the time field doesn't look like a numerical field, so it wraps every
such field in quotes, and the exported data file will look like
| 2024-09-18 "11:40 CEST"
| 2024-09-19 "11:27 CEST"
| ... ...
instead. Then gnuplot doesn't find data matching "%H:%M in the second
column of the data file and interprets it as zero or 00:00am or
whatever.
Can I make gnuplot disregard the quotation marks? Else I must tell org
that these fields should not be quoted. But ironically the only way I
know to do this is again a hack: I must adjust
`org-table-number-regexp' which... sounds like a good solution but since
org disregards a file local binding I must change the global binding of
the variable! Ugh. Better solutions welcome.
Thanks,
Michael.
next prev parent reply other threads:[~2024-12-04 10:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-28 1:21 Plotting a table of date+time pairs Michael Heerdegen
2024-11-28 9:27 ` Fraga, Eric
2024-11-28 23:17 ` Michael Heerdegen
2024-11-29 9:30 ` Fraga, Eric
2024-11-30 6:17 ` Michael Heerdegen
2024-11-30 6:48 ` Michael Heerdegen
2024-12-02 12:21 ` Fraga, Eric
2024-12-04 10:50 ` Michael Heerdegen [this message]
2024-12-04 11:51 ` Fraga, Eric
2024-12-04 13:47 ` Michael Heerdegen
2024-12-04 14:02 ` Fraga, Eric
2024-11-29 15:21 ` Max Nikulin
Reply instructions:
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ser3pvr3.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).