priviere / shinemas2R_deprecated

An R package to visualize outputs from the data base Seed History and Network Management System (SHiNeMaS)
1 stars 3 forks source link

ggplot colors and lines #9

Open gaelleVF opened 8 years ago

gaelleVF commented 8 years ago

Is it possible to put a larger color scale in the graphics ? With this one even with not many person/year/germplasm it can be hard to distinguish the different tones.

priviere commented 8 years ago

cf http://www.cookbook-r.com/Graphs/Colors_%28ggplot2%29/#a-colorblind-friendly-palette

priviere commented 8 years ago

cf http://research.stowers-institute.org/efg/Report/UsingColorInR.pdf

priviere commented 8 years ago

It could be possible to add combinaison of colors and lines : for one color, two lines example: p1_GxE = ggplot(data = dataf, aes(x = environnement, y = temp, colour = germplasme, group = germplasme)) p1_GxE = p1_GxE + stat_summary(fun.y = mean, geom = "line", aes(linetype = germplasme), size = 1) + scale_linetype_manual(values=rep(c("solid", "dotted"), 6))
cbbPalette <- c("#000000", "#E69F00", "#009E73", "#0072B2", "#D55E00", "#CC79A7") p1_GxE = p1_GxE + scale_color_manual(values=rep(cbbPalette, each = 2))