emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-plot - changing colors


From: Kyle Meyer
Subject: Re: org-plot - changing colors
Date: Fri, 01 May 2020 03:19:34 +0000

Stephan Fabel <address@hidden> 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.



reply via email to

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