1

I am currently trying to put a boxplot below a jitter, and want to color the boxes in a lighter shade.

So in opposite to this post https://stackoverflow.com/a/9236205/1842673 I just could add a '+' instead of the '-' in the line

cols_dk <- rgb2hsv(col2rgb(colour)) - c(0, 0, 0.2)

However, since as mentioned in the last answer on that page "proto" was discontinued, I can not seem to get this to work. Is there another (new) way to reach that point?

I also tried to just add

+scale_color_hue(l=80)

Directly after the layer definition, however, this then applies to the whole plot (also to the jitter layer.

In this request https://github.com/hadley/ggplot2/issues/723 a more general solution has been asked for, so if there is someone here, who could help with that, it would be a nice thing as well...

Any suggestions?

Community
  • 1
  • 1
TobiO
  • 1,335
  • 1
  • 9
  • 24
  • Can you provide a minimal, reproducible example? – joran Nov 21 '12 at 18:31
  • 1
    @TobiO I put an updated answer at your first link that should solve your problem. I made the boxplot darker rather than lighter, but you can easily adjust the color. http://stackoverflow.com/a/13504605/1700987 – MattBagg Nov 22 '12 at 01:22
  • possible duplicate of [ggplot2: Multiple color scales or shift colors systematically on different layers?](http://stackoverflow.com/questions/9232331/ggplot2-multiple-color-scales-or-shift-colors-systematically-on-different-layer) – mnel Nov 22 '12 at 02:19
  • @mnel I guess you could call it that, however, since the solution was not working anymore (and I am to new a member to be allowed commenting anywhere) I decided to ask... – TobiO Nov 22 '12 at 09:33
  • Possible duplicate of [ggplot2: Multiple color scales or shift colors systematically on different layers?](https://stackoverflow.com/questions/9232331/ggplot2-multiple-color-scales-or-shift-colors-systematically-on-different-layer) – TobiO Jul 15 '19 at 19:18

0 Answers0