> ggplot(data=airquality,aes(x=Temp))+geom_histogram()
> ggplot(data=airquality,aes(x=Temp))+geom_histogram(binwidth=4,fill="white",colour="black")
<facet_grid(vars()) vs facet_wrap(vars())>
> ggplot(data=airquality,aes(x=Temp)) +geom_histogram(binwidth=4,fill="white",colour="black") +facet_grid(vars(Month)) |
> ggplot(data=airquality,aes(x=Temp)) +geom_histogram(binwidth=4,fill="white",colour="black") +facet_wrap(vars(Month)) |
|
|
<The way to adjust the position of tick mark>- scale_y_continuous(breaks=c())
> ggplot(data=airquality,aes(x=Temp)) +geom_histogram(binwidth=4,fill="white",colour="black") +facet_grid(vars(Month)) |
> ggplot(data=airquality,aes(x=Temp)) +geom_histogram(binwidth=4,fill="white",colour="black") +facet_grid(vars(Month)) +scale_y_continuous(breaks=c(5,10)) |
|
|
> ggplot(data=airquality,aes(x=Temp)) +geom_histogram(binwidth=4,fill="white",colour="black") +facet_wrap(vars(Month)) |
> ggplot(data=airquality,aes(x=Temp)) +geom_histogram(binwidth=4,fill="white",colour="black") +facet_wrap(vars(Month)) +scale_y_continuous(breaks=c(5,10)) |
|
|
<facet_wrap(vars(),scales="free")>
> ggplot(data=airquality,aes(x=Temp)) +geom_histogram(binwidth=4,fill="white",colour="black") +facet_wrap(vars(Month)) |
> ggplot(data=airquality,aes(x=Temp)) +geom_histogram(binwidth=4,fill="white",colour="black") +facet_wrap(vars(Month),scales="free") |
|
|
<facet_grid(vars(),scales="free")>
> ggplot(data=airquality,aes(x=Temp)) +geom_histogram(binwidth=4,fill="white",colour="black") +facet_grid(vars(Month)) |
> ggplot(data=airquality,aes(x=Temp)) +geom_histogram(binwidth=4,fill="white",colour="black") +facet_grid(vars(Month),scales="free") |
|
|