I’m trying to change the color of the labels and it seems that the input of vector of colors works for lines and not for labels and the label color is just the first color of the vector list.
Maybe there is a workaround? Ideally I want to have colored labels according to a group lats say “drev”, so several entries will be with the same color. Not sure if that is possible but its possible to do with a vector of colors at least.
Here is an example of what I’m trying to do with mpg data.
library(metan)
data <- mpg
gge_model <- gge(data,
env=cyl,
gen=manufacturer,
displ, #Choose trait
centering="environment",
scaling="none",
svp = "genotype",
by=NULL)
p <- plot(gge_model,
type = 2,
repel=TRUE,
repulsion=1,
max_overlaps = 20,
col.gen = c(
"black", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
"#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf",
"#393b79", "#637939", "#8c6d31", "#843c39", "#7b4173"
),
col.env = "blue",
line.type = 'solid', # in the manual solid should be default but it is dotted in fact
title = FALSE,
size.text.env = 3,
size.text.gen = 3,
size.line=2,
plot_theme=theme_metan(grid = "none", col.grid = "white", color.background = "white"))+
labs(title = element_text("p"))
p