[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Plotting date on xaxis
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] Plotting date on xaxis |
Date: |
Tue, 23 Feb 2010 17:05:45 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) |
Eric S Fraga <address@hidden> writes:
[...]
>
> I have narrowed down what causes the problem although I don't
> understand why (I haven't had any time to look at the elisp code).
> Basically, the problem with Johan's initial table was the extra empty
> row at the end:
>
Ah,
Thanks for isolating the issue.
It looks like the empty last row is tricking org-plot.el into thinking
that the entire Date column contains text labels, so it tries to use the
values of that column to label the data with xticlabels [1]. This is
useful for histograms such as the "Citas" graph in [2].
So all in all I'd say this is fine behavior for something like org-plot
which tries to guess the user's intentions.
Best -- Eric
>
> #+PLOT: title:"Weight" ind:1 deps:(2) type:2d with:linespoints set:"xdata
> time" set:"timefmt '%Y-%m-%d'" set:"yrange [90:]"
> | Date | Kg |
> |------------+------|
> | 2010-02-21 | 95.0 |
> | 2010-02-22 | 93.0 |
> | 2010-02-23 | 92.0 |
> | 2010-02-24 | 91.5 |
> | 2010-02-25 | 91.0 |
> | 2010-02-28 | 92.0 |
> | | |
>
> With the empty row there, the "using 1:2" option to the gnuplot plot
> command is not generated correctly, instead generating "using
> 1:xticlable(1)" which gnuplot doesn't like! If the last row is
> deleted, everything works just fine (even if February doesn't have 29
> days in 2010 ;-).
>
> HTH,
> eric
Footnotes:
[1] http://www.gnuplot.info/docs/node135.html
[2] http://orgmode.org/worg/org-tutorials/org-plot.php