* org-plot - changing colors
@ 2020-04-30 11:25 Stephan Fabel
2020-05-01 3:19 ` Kyle Meyer
0 siblings, 1 reply; 2+ messages in thread
From: Stephan Fabel @ 2020-04-30 11:25 UTC (permalink / raw)
To: emacs-orgmode
Hello,
apologies if this is the wrong group.
I'm trying to plot a table which looks like this:
| Team | Bu | R | Bk | G | T | % Bu | % R | % Bk | %G |
|-----------+----+---+----+----+----+------+------+------+------|
| Team 1 | 4 | 5 | 2 | 24 | 35 | 11.4 | 14.3 | 5.7 | 68.6 |
| Team 2 | 3 | 2 | 1 | 35 | 41 | 7.3 | 4.9 | 2.4 | 85.4 |
| Team 3 | 5 | 8 | 3 | 6 | 22 | 22.7 | 36.4 | 13.6 | 27.3 |
| Team 4 | 6 | 4 | 5 | 15 | 30 | 20.0 | 13.3 | 16.7 | 50.0 |
| Team 5 | 5 | 7 | 4 | 22 | 38 | 13.2 | 18.4 | 10.5 | 57.9 |
| Team 6 | 8 | 9 | 6 | 27 | 50 | 16.0 | 18.0 | 12.0 | 54.0 |
| Team 7 | 1 | 3 | 0 | 19 | 23 | 4.3 | 13.0 | 0.0 | 82.6 |
| Team 8 | 10 | 7 | 1 | 4 | 22 | 45.5 | 31.8 | 4.5 | 18.2 |
| Team 9 | 3 | 4 | 1 | 15 | 23 | 13.0 | 17.4 | 4.3 | 65.2 |
| Team 10 | 2 | 4 | 1 | 18 | 25 | 8.0 | 16.0 | 4.0 | 72.0 |
| Team 11 | 1 | 1 | 0 | 21 | 23 | 4.3 | 4.3 | 0.0 | 91.3 |
| Team 12 | 8 | 2 | 1 | 45 | 56 | 14.3 | 3.6 | 1.8 | 80.4 |
Plotting this with
#+PLOT: ind:1 deps:(7 8 9 10) type:2d with:histogram \
set:"ylabel '%'" set:"style fill solid 0.5"
works like a charm, except I'd like to change the colors of the
histogram bars (as it turns out Bu=Blue, R=Red, Bk=Black and G=Green as
per the title row in the table).
What's the recommended way to go about this? I'm not super familiar with
gnuplot, but before I go deep there, I figured I'd ask if there's a
simple 'org-plot'-way of doing this?
Thanks,
Stephan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: org-plot - changing colors
2020-04-30 11:25 org-plot - changing colors Stephan Fabel
@ 2020-05-01 3:19 ` Kyle Meyer
0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2020-05-01 3:19 UTC (permalink / raw)
To: Stephan Fabel, emacs-orgmode
Stephan Fabel <stephan.fabel@gmail.com> writes:
> I'm trying to plot a table which looks like this:
>
> | Team | Bu | R | Bk | G | T | % Bu | % R | % Bk | %G |
> |-----------+----+---+----+----+----+------+------+------+------|
> | Team 1 | 4 | 5 | 2 | 24 | 35 | 11.4 | 14.3 | 5.7 | 68.6 |
> | Team 2 | 3 | 2 | 1 | 35 | 41 | 7.3 | 4.9 | 2.4 | 85.4 |
[...]
> Plotting this with
>
> #+PLOT: ind:1 deps:(7 8 9 10) type:2d with:histogram \
> set:"ylabel '%'" set:"style fill solid 0.5"
>
> works like a charm, except I'd like to change the colors of the
> histogram bars (as it turns out Bu=Blue, R=Red, Bk=Black and G=Green as
> per the title row in the table).
>
> What's the recommended way to go about this? I'm not super familiar with
> gnuplot, but before I go deep there, I figured I'd ask if there's a
> simple 'org-plot'-way of doing this?
I had luck changing the colors with a header like this, where the last
two lines are the additional bits:
#+PLOT: ind:1 deps:(7 8 9 10) type:2d with:histogram
#+PLOT: set:"ylabel '%'" set:"style fill solid 0.5" set:"style fill solid 0.5"
#+PLOT: set:"lt 1 lc rgb 'blue'" set:"lt 2 lc rgb 'red'"
#+PLOT: set:"lt 3 lc rgb 'black'" set:"lt 4 lc rgb 'green'"
I know very little about gnuplot and even less about org-plot, though,
so there might be a better way to do this.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-01 3:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-30 11:25 org-plot - changing colors Stephan Fabel
2020-05-01 3:19 ` Kyle Meyer
Code repositories for project(s) associated with this public 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).