I have this data and code by which I have this plot
In the plot you are seeing non-responders come at first then responders come
Nowhere in the code I can see how I change the group
"Non-responders")), row.names = c(NA, -22L), class = "data.frame")
library(dplyr)
library(ggplot2)
library(ggrepel)
x <- x %>%
rename(log10_qvalue = log10_pvalue)
ggplot(data = x, aes(x = log10_qvalue, y = Percentage_altered/100, color = CNV)) +
geom_point( ) +
scale_discrete_manual(aesthetics = "colour", values = c("Deletion" = "blue", "Amplification" = "red")) +
geom_text_repel(aes(label = gene), size = 5) +
facet_grid(CNV ~ group) +
labs(x = "-log10(qvalue)", y = "Net frequency of gain and deletion (%)") +
theme_bw() +
theme(
legend.position = "none",
axis.title = element_text(size = 12, face = "bold"),
axis.text = element_text(size = 12, face = "bold"),
strip.text = element_text(size = 12, face = "bold")
)
How I change this code so that first responders come in left and non-responders in right?