From: "Eric Schulte" <schulte.eric@gmail.com>
To: David O'Toole <dto1138@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-plotting with date as the independent variable
Date: Tue, 07 Jul 2009 12:25:42 -0700 [thread overview]
Message-ID: <m2vdm4cn2h.fsf@gmail.com> (raw)
In-Reply-To: <64bfe3d50906230749h5d5fd04djdec158e2d581fed9@mail.gmail.com> (David O'Toole's message of "Tue, 23 Jun 2009 10:49:59 -0400")
[-- Attachment #1: Type: text/plain, Size: 2727 bytes --]
"David O'Toole" <dto1138@gmail.com> writes:
> I'm having trouble with org-plotting data that is captured on certain dates over time, like my bodyweight. My table looks like this,
> but the plotting seems to be very wrong:
>
> #+PLOT: ind:1 timefmt:"%Y-%m-%d" with:points
> | Date | Weight |
> |------------+--------|
> | 2008-09-26 | 266 |
> | 2008-10-08 | 261 |
> | 2008-10-16 | 263 |
> | 2008-10-19 | 259 |
> | 2009-05-20 | 272 |
> | 2009-06-12 | 274 |
> | 2009-06-23 | 275 |
>
> I've attached the incorrect image.
>
Hi David,
You've uncovered a problem with org-plot. I'm attaching a small patch[1]
which will fix this issue. Once that patch is applied you can plot
dates with the following org-plot options.
#+PLOT: timeind:1 timefmt:"%Y-%m-%d"
| Date | Weight |
|------------+--------|
| 2008-09-26 | 266 |
| 2008-10-08 | 261 |
| 2008-10-16 | 263 |
| 2008-10-19 | 259 |
| 2009-05-20 | 272 |
| 2009-06-12 | 274 |
| 2009-06-23 | 275 |
Thanks for catching this bug.
>
> Also how can I plot the totals from a bunch of separate tables as the dependent variable? Each of the tables would be like the
> following below:
>
> | Time | Description | Calories |
> |------+------------------------+----------|
> | 6:00 | Whey shake, 2 scoops | 200 |
> | | + 2 cups skim milk | 180 |
> | 9:30 | 4 egg whites | 120 |
> | | + 2 slices salami | 200 |
> | | + 1 slice cheese | 110 |
> | | Whey shake, 2 scoops | 200 |
> | | + 2 cups skim milk | 180 |
> | | light yogurt | 60 |
> | | rice cake | 40 |
> | | + 2 tbsp peanut butter | 200 |
> |------+------------------------+----------|
> | | TOTAL | 1490 |
> #+TBLFM: @12$3=vsum(@2$3..@11$3)
>
>
>
>
I believe org-mode does support referencing cells in other tables (if
the other table is named), however I don't know of a way to reference
multiple tables. Maybe if you could package the totals into properties
of headlines then you could use something like column view, or
org-collector[2].
Best -- Eric
>
> _______________________________________________
> 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
Footnotes:
[1]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-plot-timeformats.patch --]
[-- Type: text/x-patch, Size: 435 bytes --]
diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 78775a0..aee4656 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -64,6 +64,7 @@ Returns the resulting property list."
("file" . :file)
("labels" . :labels)
("map" . :map)
+ ("timeind" . :timeind)
("timefmt" . :timefmt)))
(multiples '("set" "line"))
(regexp ":\\([\"][^\"]+?[\"]\\|[(][^)]+?[)]\\|[^ \t\n\r;,.]*\\)")
[-- Attachment #3: Type: text/plain, Size: 62 bytes --]
[2] http://orgmode.org/worg/org-contrib/org-collector.php
[-- Attachment #4: Type: text/plain, Size: 204 bytes --]
_______________________________________________
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
prev parent reply other threads:[~2009-07-07 19:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 14:49 org-plotting with date as the independent variable David O'Toole
2009-07-07 19:25 ` Eric Schulte [this message]
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=m2vdm4cn2h.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=dto1138@gmail.com \
--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).