* a couple of items
@ 2020-06-03 21:06 Mario Frasca
2020-06-04 11:53 ` Eric S Fraga
0 siblings, 1 reply; 6+ messages in thread
From: Mario Frasca @ 2020-06-03 21:06 UTC (permalink / raw)
To: emacs-orgmode
consider this table, partially from the Wikipedia:
#+PLOT: with:histogram ind:1
| 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
here I have a couple things which I would like to do straight from
org-plot, and don't work.
1) keep the header on two lines.
2) only plot the middle section, that's excluding the "world" summary.
3) manually indicate the desired colour for each bar.
4) plot one of the columns as points, not as bars.
something unrelated, but still about org-plot:
*) it's very practical that you can split #+PLOT lines, and it would be
more useful if you could mark any of them as non active, "comment out",
but so that this doesn't break the search for options. something like
#--+PLOT, whatever. I would use it for alternative settings and it
would spare me shuffling lines around.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a couple of items
2020-06-03 21:06 a couple of items Mario Frasca
@ 2020-06-04 11:53 ` Eric S Fraga
2020-06-04 21:29 ` Mario Frasca
0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2020-06-04 11:53 UTC (permalink / raw)
To: Mario Frasca; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a couple of items
2020-06-04 11:53 ` Eric S Fraga
@ 2020-06-04 21:29 ` Mario Frasca
2020-06-05 11:38 ` Eric S Fraga
0 siblings, 1 reply; 6+ messages in thread
From: Mario Frasca @ 2020-06-04 21:29 UTC (permalink / raw)
To: emacs-orgmode
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a couple of items
2020-06-04 21:29 ` Mario Frasca
@ 2020-06-05 11:38 ` Eric S Fraga
2020-06-05 12:09 ` TEC
0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2020-06-05 11:38 UTC (permalink / raw)
To: Mario Frasca; +Cc: emacs-orgmode
On Thursday, 4 Jun 2020 at 16:29, Mario Frasca wrote:
> hi. thank you. seeing hand written code in the target language is
> always useful, when writing a translator. :+1: :-)
Sometimes, or often, a translator is too constraining. I find it
easier/faster to write my own gnuplot code directly as it gives me the
fine control I need for publication quality figures.
The great thing about gnuplot is that *everything* can be tweaked. The
bad thing about gnuplot is that everything *can* be tweaked. ;-) Sort of
like Emacs actually.
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-640-g9bc0cc
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-06-05 12:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-03 21:06 a couple of items Mario Frasca
2020-06-04 11:53 ` Eric S Fraga
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.