emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Stephan Fabel <stephan.fabel@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: org-plot - changing colors
Date: Fri, 01 May 2020 03:19:34 +0000	[thread overview]
Message-ID: <87tv10gx4p.fsf@kyleam.com> (raw)
In-Reply-To: <87mu6tcj0j.fsf@address-here.net>

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.


      reply	other threads:[~2020-05-01  3:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 11:25 org-plot - changing colors Stephan Fabel
2020-05-01  3:19 ` Kyle Meyer [this message]

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=87tv10gx4p.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=stephan.fabel@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).