How to change facet labels?

后端 未结 20 1858
既然无缘
既然无缘 2020-11-22 14:50

I have used the following ggplot command:

ggplot(survey, aes(x = age)) + stat_bin(aes(n = nrow(h3), y = ..count.. / n), binwidth = 10)
  + scale         


        
20条回答
  •  独厮守ぢ
    2020-11-22 15:20

    This is working for me.

    Define a factor:

    hospitals.factor<- factor( c("H0","H1","H2") )
    

    and use, in ggplot():

    facet_grid( hospitals.factor[hospital] ~ . )
    

提交回复
热议问题