Producing a boxplot in ggplot2 using summary statistics

前端 未结 1 464
说谎
说谎 2020-12-16 00:31

Below is a code for producing a boxplot using ggplot2 I\'m trying to modify in order to suit my problem:

library(ggplot2)
set.seed(1)
# create fictitious dat         


        
1条回答
  •  囚心锁ツ
    2020-12-16 00:55

    ggplot(mydata.mine, aes(x = as.factor(group))) +
      geom_boxplot(aes(
          lower = mean - sd, 
          upper = mean + sd, 
          middle = mean, 
          ymin = mean - 3*sd, 
          ymax = mean + 3*sd),
        stat = "identity")
    

    enter image description here

    0 讨论(0)
提交回复
热议问题