如何用R的ggplot调整桑基图:条形标签左移、数值标签上移
图表调整需求及现有实现
调整需求
- 将图例对应的标签水平放置在每个条形的左侧
- 将数值标签从图的底部移至顶部
当前使用的代码
ggplot(data= AZD.melt, aes(x = variable, y = value, stratum = id, alluvium = risk_factors_for_stroke_in_blacks, fill = risk_factors_for_stroke_in_blacks, colour = id, label = value)) + geom_flow(stat = "alluvium", lode.guidance = "frontback", color= "white")+ geom_stratum(color = "white", width = 0.7) + geom_text(position = position_stack(vjust= 0.5), colour = "white")
当前生成的图表

内容的提问来源于stack exchange,提问作者ElHombre
相关产品推荐
相关产品推荐

