facet_wrap()
中的每个方面分别绘制渐变色标。数据太大,无法在此处发布,但这是我的代码:ggplot(stack, aes(hour, day)) +
geom_tile(aes(fill = percent), colour = "white") +
facet_wrap(~author, ncol = 3) +
theme_minimal() +
scale_fill_distiller(palette = 'RdYlBu') +
theme(
axis.title.x = element_blank(), axis.title.y = element_blank(),
legend.position = "none",
strip.background = element_rect(fill = '#E5E6E1'),
strip.text = element_text(face = 'bold')
)
但是,如果我仅逐个绘制一位作者,则会得到:
我只是想用自己的渐变色标绘制每个构面,而不是与其他构面共享。应该很简单,但是我没有做到。我尝试在group = author
和aes()
的geom_tile()
中添加ggplot()
,但无法正常工作。
我正在努力为facet_wrap()中的每个方面分别绘制渐变色标。数据太大,无法在此处发布,但这是我的代码:ggplot(stack,aes(hour,day))+ geom_tile(aes(fill = ...