Dear All,
Would you please let me know how to remove this "class" from the output figure? this is what I am using to generate the plot.
install.packages("readxl")
library("readxl")
library(ggplot2)
library(tidyverse)
library(dplyr)
tmp_table <- read.csv(text="
class_set_val
2_12_49319
2_13_98443
3_123_18191
3_124_8405
4_1234_2807
4_1235_2871
5_12345_425
5_12346_310
6_123456_50
6_123457_55
")
df <- (tmp_table %>% separate(class_set_val,c("class","set","val"),sep="([_])")
)
df$class <- factor(df$class,
levels = c("2","3","4","5","6","7"),
labels = c("2-fold","3-fold","4-fold","5-fold","6-fold","7-fold") )
df$val <- as.numeric(df$val)
df$log_val <- log10(df$val)
plotting on normal scale
p0 <- (ggplot(df, aes(x=set,y=val,col=class))
+ geom_point(aes(colour = factor(class)), size = 6)
##+ geom_smooth(se = FALSE, method = lm) ## trend in each class
+ facet_wrap(~ class)
+ facet_grid(~ class , scales="free")
)
print(p0)
p1 <- (ggplot(df, aes(x=set,y=log_val,col=class))
+ geom_point(aes(colour = factor(class)), size = 4)
+ xlab("CP")
+ ylab("CC")
##+ geom_smooth(se = FALSE, method = lm) ## trend in each class
+ facet_wrap(~ class)
+ facet_grid(~ class , scales="free")
)
print(p1)