美文网首页
ggplot2: 局部放大

ggplot2: 局部放大

作者: LET149 | 来源:发表于2023-06-29 11:01 被阅读0次

1. ggforce

ggplot() + facet_zoom(ylim=, zoom.size=)
zoom.size= : 控制缩放图的宽度

require(ggforce)
ggplot()+geom_bar(data=kk, aes(x=V2, y=V1, group=group, fill=V3), stat = "identity", position = "dodge")  #示例一
ggplot()+geom_bar(data=kk, aes(x=V2, y=V1, group=group, fill=V3), stat = "identity", position = "dodge")+facet_zoom(ylim = c(0,1000))  #示例二
示例一
示例二

相关文章

网友评论

      本文标题:ggplot2: 局部放大

      本文链接:https://www.haomeiwen.com/subject/lwdzprtx.html