上下文:我正在尝试将facet_grid转换为facet_wrap以添加ncols。我知道cols=conference会改变,但我不知道如何改变。
graph <- ggplot(data, aes(week, positivity_rate, color=school)) +
geom_line() +
facet_grid(cols=vars(conference))
graph发布于 2022-09-29 10:05:20
library(tidyverse)
ggplot(iris, aes(Petal.Length, Petal.Width, color=Species)) +
geom_line() +
facet_grid(cols=vars(Species))
ggplot(iris, aes(Petal.Length, Petal.Width, color=Species)) +
geom_line() +
facet_wrap(~Species,ncol = 2) https://stackoverflow.com/questions/73856386
复制相似问题