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 22:19:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Le 06/12/2016 18:54, Karl Voit a écrit :
* Thierry Banel <address@hidden> wrote:
What about GnuPlot?
Heard about it. Never used.

#+plot: ind:1 deps:(2) type:2d with:"impulse lw 6" set:"yrange [0:]"
| When             | How many |
|------------------+----------|
| [2016-11-17 Thu] |        3 |
| [2016-11-23 Wed] |        4 |
| [2016-12-10 Sat] |        1 |
Cryptic syntax IMO.

Cryptic, indeed.
ind:1          column one is used as the x axis
deps:(2)       column two is the y axis; there might be several columns
type:2d        a nice 3d type is also available
with:"impulse  vertical bars like in your sketch
lw 6           line width is 6 pixels   
yrange [0:]    y axis starts at zero, upper bound is automatic

With the #+plot: facility there is not much more to learn.
Use babel-gnuplot for more flexibility.


I guess I need weeks of learning basics in order to understand GnuPlot so that
I am able to derive those plot-lines all by myself?
Yes, weeks are needed for mastering Gnuplot.
It is fun, frustrating, fun, frustrating, fun, frustrating
The learning curve starts very low, though. Just type:
  plot sin(x)
and you get a nice graphic.
Gnuplot comes with default values.



      
Type
   org-plot/gnuplot
or
   C-c " g
in the table
Then I get «Starting gnuplot plotting program...Done» in my
mini-buffer.

That's it.

I recognized that a *gnuplot* buffer was created in background. Its
content is ...

,----
| Terminal type set to 'unknown'
| gnuplot> reset
| gnuplot> set yrange [0:]
| gnuplot> set datafile separator "\t"
| gnuplot> set xdata time
| gnuplot> set timefmt "%Y-%m-%d-%H:%M:%S"
| gnuplot> plot '/tmp/org-plot11956t0A' using 1:2 with impulse lw 6 title 'How many'
| gnuplot>
`----

... which I do not understand yet.

Since you just mentioned invoking org-plot/gnuplot, I guess there
should be any result somewhere somehow which did not work at my
side.

I could not locate any file or directory /tmp/org-plot11956t0A.

What *should* happen?


Ok fine, Gnuplot is installed on your computer.
You should see a window (unrelated to Emacs) showing something like that:




Here is the same plot with this setting:
  set term dumb size 80,21

    4 ++-++-++-++-++-++-++*-++-++-++-++-+++-++-++-++-++-+++-++-++-++-++-++-++
      +     +     +     + *  +     +     +     +     +data using 1:2 ****** +
  3.5 ++                  *                                                ++
      |                   *                                                 |
    3 ++ *                *                                                ++
      |  *                *                                                 |
  2.5 ++ *                *                                                ++
      |  *                *                                                 |
    2 ++ *                *                                                ++
      |  *                *                                                 |
  1.5 ++ *                *                                                ++
      |  *                *                                                 |
    1 ++ *                *                                                +*
      |  *                *                                                 *
  0.5 ++ *                *                                                +*
      +  *  +     +     + *  +     +     +     +     +    +     +     +     *
    0 ++-*+-++-++-++-++-++*-++-++-++-++-+++-++-++-++-++-+++-++-++-++-++-++-+*
    11/16 11/18 11/20 11/2211/24 11/26 11/28 11/30 12/0212/04 12/06 12/08 12/10



Your *gnuplot* buffer starts with:
  Terminal type set to 'unknown'
Mine starts with:
  Terminal type set to 'wxt'
This is why you see nothing.

"Terminal" is the output back-end.
It might be an interactive window.
Or it might be a file: pdf, jpg, gif, png, svg, ascii and much more.


I'm afraid your first contact with Gnuplot was frustrating.
Well, you may try Gnuplot outside Emacs to understand if the problem comes from Emacs or Gnuplot.
On Linux type gnuplot in a terminal.
On Windows it should be something like wgnuplot.exe which launches a kind of terminal.
Then type
  plot x*x
A window opens and you get your first graphic.

You may be more lucky with Babel (see my other post).








reply via email to

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