* org-plotting with date as the independent variable
@ 2009-06-23 14:49 David O'Toole
2009-07-07 19:25 ` Eric Schulte
0 siblings, 1 reply; 2+ messages in thread
From: David O'Toole @ 2009-06-23 14:49 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1281 bytes --]
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.
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)
[-- Attachment #1.2: Type: text/html, Size: 1421 bytes --]
[-- Attachment #2: orgplot.png --]
[-- Type: image/png, Size: 31946 bytes --]
[-- Attachment #3: 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: org-plotting with date as the independent variable
2009-06-23 14:49 org-plotting with date as the independent variable David O'Toole
@ 2009-07-07 19:25 ` Eric Schulte
0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2009-07-07 19:25 UTC (permalink / raw)
To: David O'Toole; +Cc: emacs-orgmode
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-07 19:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-23 14:49 org-plotting with date as the independent variable David O'Toole
2009-07-07 19:25 ` Eric Schulte
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.