Multiple boxplots placed side by side for different column values in ggplot

前端 未结 3 1756
余生分开走
余生分开走 2020-12-30 13:40

I have read different posts like this and this but my problem has a small variation. I have a df like this

ID <- c(\"DJ45\",\"DJ46\",\"DJ47\",\"DJ48\",\"         


        
3条回答
  •  孤独总比滥情好
    2020-12-30 14:04

    You could also do it without facet_wrap like so:

    library(reshape2)
    
    df2<-melt(df1,id.var=c("ID","Tool","Name"))
    
    p <- ggplot(df2, aes(variable, value,fill=Tool))
    p + geom_boxplot() + labs(title = "CMP")
    

提交回复
热议问题