hi.  thank you.  seeing hand written code in the target language is always useful, when writing a translator.  :+1:  :-)

On 04/06/2020 06:53, Eric S Fraga wrote:
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


Reply via email to