标签: r ggplot2 tidyverse
我想知道是否可以仅在面板“2”上绘制因子“b”? 我真的很感激任何帮助!
library(tidyverse) df <- tibble( group = c(1, 2, 1), item_name = factor(c("a", "b", "b")), value1 = 1:3 ) df %>% ggplot(aes(item_name, value1)) + geom_point() + facet_wrap(~group)
答案 0 :(得分:1)
df %>% ggplot(aes(item_name, value1)) + geom_point() + facet_wrap(~group, scale="free_x")