I need to change the color of
U treatment only to red, but I end up having the following figure. I attempted to change the color of the first x label using
axis.text.x = element_text(color = c("red", "black", "black")) but it seems that every first element in the panel will also change color to red. I only want the change of color happen in the first panel.
Here's the code for the figure:
x = ggplot(stmraw.csv, aes(x, y, fill=group)) + theme_classic() + labs(x = 'Labels', y = 'Index') + geom_boxplot() + facet_rep_grid(.~group, scales = 'free_x', ) + scale_fill_manual(values=color_scheme) + theme(legend.position="none", strip.background = element_blank(), strip.text.x = element_text(size=12), axis.line.y = element_line(colour = 'black', size=0.5, linetype='solid'), axis.text.x = element_text(color = c("red", "black", "black")) ## Attempt to change the color of the first x label ) + scale_y_continuous(breaks = c(0, 0.25, 0.50, 0.75, 1))