I have three groups (Tissue) and two groups (Treatment) represented in a faceted boxplot and I would like to remove the legend for "treatment", as it is already represented in the graph and keep the legend for "Tissue".
box <- ggboxplot(subclusDF, x = 'Treatment', y = 'ATP4', fill = "Tissue", color = 'Tissue', palette = qualitative_hcl(3, palette = 'Dark 3'), add = 'jitter', shape = 'Treatment' )
box <- box + labs(title= 'GHRL') + xlab(NULL) + ylab("Expression") + facet_grid(~Tissue)
box
box + theme()+
theme(
plot.title = element_text(face = "bold", size = 12),
legend.background = element_rect(fill = "white", size = 4, colour = "white"),
legend.justification = c(0, 1),
legend.title=element_text(NULL),
legend.key = element_blank(),
legend.position = c(0, 1),
axis.text = (NULL),
axis.ticks = element_line(colour = "grey70", size = 0.2),
panel.grid.major = element_line(colour = "grey70", size = 0.2),
panel.grid.minor = element_blank()
)
box