emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <ucecesf@ucl.ac.uk>
To: Johan Ekh <ekh.johan@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Plotting date on xaxis
Date: Tue, 23 Feb 2010 09:52:56 +0000	[thread overview]
Message-ID: <874ol8e0sn.wl%ucecesf@ucl.ac.uk> (raw)
In-Reply-To: <417457b51002221031k48e2470aof86f6b6e71ea454b@mail.gmail.com>

On Mon, 22 Feb 2010 19:31:41 +0100, Johan Ekh <ekh.johan@gmail.com> wrote:
> 
> [1.1  <text/plain; ISO-8859-1 (7bit)>]
> Hi all,
> I try to plot a table looking like this
> 
>      |       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-29 | 92.0 |
>      |                  |        |
> 
> with the dates on the xaxis using
> 
> #+PLOT: title:"Weight" ind:1 deps:(2) type:2d with:linespo set:"xdata time"
> timefmt:%Y-%m-%d set:"yrange [90:]"
> 
> but no plot is generated. If I remove <set:"xdata time">, the plot is
> generated but without interpreting the dates as dates.
> 
> Can anyone see what I do wrong?
> 
> Thanks in advance,
> 
> Johan
> [1.2  <text/html; ISO-8859-1 (quoted-printable)>]
> 

Johan,

I've played with this a bit and I also cannot get it to work.
However, looking at the gnuplot comint buffer created, there is an
error message that indicates that plotting xdata in time format
requires a using statement to specify directly the columns to plot.  I
have tried, therefore, the following specification on the plot line:

--8<---------------cut here---------------start------------->8---
#+PLOT: title:"Weight" ind:1 deps:(2) type:2d with:linespoints set:"xdata time" set:"timefmt '%Y-%m-%d'" set:"yrange [90:]" ind:1 deps:(2)
|       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-29 | 92.0 |
--8<---------------cut here---------------end--------------->8---

I had to put quotes around the time format and also (just in case)
spelled out linespoints fully.  However, this still doesn't work
because org-plot/gnuplot generates the following plot command:

,----
| plot '/tmp/org-plot1831zcQ' using 2:xticlabel(1) with linespoints title 'Kg'
`----

Note the strange using parameters!  I am not sure where this is coming
from unfortunately.  Note that if I type this in directly in gnuplot,
with "using 1:2", everything works just fine.

eric

  reply	other threads:[~2010-02-23 10:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 18:31 Plotting date on xaxis Johan Ekh
2010-02-23  9:52 ` Eric S Fraga [this message]
2010-02-23 14:47 ` Eric Schulte
2010-02-23 16:27   ` Johan Ekh
2010-02-23 17:15     ` Dan Davison
2010-02-23 17:33       ` Eric Schulte
2010-02-23 22:52   ` Eric S Fraga
2010-02-24  0:05     ` Eric Schulte
2010-02-24  8:07       ` Eric S Fraga
2010-02-25 17:44         ` Eric Schulte
2010-02-25 20:11           ` Eric S Fraga
2010-02-26 15:09             ` Johan Ekh
2010-05-15 13:47 ` Ivan Vilata i Balaguer

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=874ol8e0sn.wl%ucecesf@ucl.ac.uk \
    --to=ucecesf@ucl.ac.uk \
    --cc=e.fraga@ucl.ac.uk \
    --cc=ekh.johan@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).