emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Mario Frasca <mario@anche.no>
Cc: emacs-orgmode@gnu.org
Subject: Re: a couple of items
Date: Thu, 04 Jun 2020 12:53:42 +0100	[thread overview]
Message-ID: <87a71jcaih.fsf@ucl.ac.uk> (raw)
In-Reply-To: <1b6d4075-e1d1-172e-f150-f5d4e179bf62@anche.no>

On Wednesday,  3 Jun 2020 at 16:06, Mario Frasca wrote:
> consider this table, partially from the Wikipedia:

If you are willing to invoke gnuplot directly, using a src block, the
following is a start towards what you might want.  Proper nice looking
colours etc. left as an exercise for the reader... ;-)

#+begin_src org
  ,#+name: table
  | Region         |   Area | Production | Productivity |
  |                |  (Mha) |  (Mtonnes) |  (tonnes/ha) |
  |----------------+--------+------------+--------------|
  | Western Europe |  2.490 |      5.730 |    2.3012048 |
  | North America  |  2.960 |      5.756 |    1.9445946 |
  | South America  |  0.102 |      0.196 |    1.9215686 |
  | Middle East    |  4.462 |      6.950 |    1.5575975 |
  | North Africa   |  3.290 |      3.214 |    0.9768997 |
  | Others         |  3.756 |      3.540 |    0.9424920 |
  |----------------+--------+------------+--------------|
  | World          | 17.060 |     25.360 |    1.4865181 |
  ,#+TBLFM: $4=$3/$2

  ,#+begin_src gnuplot :var data=table[3:8,] :file plot.pdf
    reset
    set term pdfcairo color
    set xtics rotate 90
    set style fill solid border lt 1
    plot data using 2:xticlabels(1) with histogram linecolor "blue" title 'Area', \
         '' using 3 with histogram lt 1 linecolor "red" title 'Production', \
         '' using 4 with points pt 5 linecolor black title 'Productivity'
  ,#+end_src
#+end_src

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-640-g9bc0cc


  reply	other threads:[~2020-06-04 11:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 21:06 Mario Frasca
2020-06-04 11:53 ` Eric S Fraga [this message]
2020-06-04 21:29   ` Mario Frasca
2020-06-05 11:38     ` Eric S Fraga
2020-06-05 12:09       ` TEC
2020-06-05 12:24         ` Eric S Fraga

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=87a71jcaih.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=mario@anche.no \
    --subject='Re: a couple of items' \
    /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

Code repositories for project(s) associated with this 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).