emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Time-Event-Diagrams


From: Thierry Banel
Subject: Re: [O] Time-Event-Diagrams
Date: Tue, 06 Dec 2016 18:09:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Or with babel-gnuplot?
The result is an SVG file that a web browser can display.


#+name: whentable
| When             | How many |
|------------------+----------|
| [2016-11-17 Thu] |        3 |
| [2016-11-23 Wed] |        4 |
| [2016-12-10 Sat] |        1 |

#+BEGIN_SRC gnuplot :file whenfile.svg :var data="" :session none :term svg size 600,200

  set timefmt "%Y-%m-%d-%H:%M:%S"
  set xdata time
  set yrange [0:]
  plot data using 1:2 w impulse lw 6
#+END_SRC

#+RESULTS:
[[file:whenfile.svg]]





Le 05/12/2016 17:36, Karl Voit a écrit :
Hi!

I am using following template to generate boxplot diagrams from 
values within an org-mode table:

    #+NAME: boxplot-$1
    #+BEGIN_SRC R :var data="" :exports code :results none
    pdf('~/tmp/2del/boxplot-$1.pdf')
    
    boxplot(data\$${3:column},
        names=c("${4:column description}"),
        xlab="${5:x-axis}",
        ylab="${6:y-axis}",
        pars = list(boxwex = 0.3, staplewex = 0.5,
        boxfill="lightblue"))
    #+END_SRC
    
    [[file:~/tmp/2del/boxplot-$1.pdf]]

Do you have an idea, how I am able to generate a one- or 
two-dimensional diagram where I can visualize date/time-events?

The date/time events should be used from a table such as:

      | When             | How many |
      |------------------+----------|
      | [2016-11-17 Thu] |        3 |
      | [2016-11-23 Wed] |        4 |
      | [2016-12-10 Sat] |        1 |

Something like:

      Events |
             |             x
             |  x          x
             |  x          x
             |  x          x                 x
             +-------------------------------------> t
              17 Nov     23 Nov            10 Dec

... and/or 2-dimensional with only one event per date: missing second 
column of the table above.

Important: the x-position of each event (or bar) has to be relative
to its date/time: between 17 Nov and 23 Nov there is less space than 
between 23 Nov and 10 Dec.

I am open for R, Python or any _javascript_-foo I am able to use 
in a web browser.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]