如何垂直(在Y轴上)更改Sankey Diagram中节点的位置,使其看起来像下面带有红色节点的示例:
我的数据集:
(...)
match = re.findall(r'^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$' , line)
(...)
我的代码:
> dput(final_df_2)
structure(list(individual_id = c(21L, 21L, 22L, 23L, 24L, 24L,
24L, 25L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 27L, 27L, 27L, 27L
), number = c(1L, 2L, 1L, 1L, 1L, 2L, 3L, 1L, 1L, 2L, 3L, 4L,
5L, 6L, 7L, 1L, 2L, 3L, 4L), treatment = structure(c(5L, 3L,
2L, 4L, 1L, 5L, 3L, 2L, 3L, 5L, 2L, 5L, 4L, 5L, 1L, 2L, 5L, 5L,
3L), .Label = c("Adalimumab", "Etanercept", "Infliximab", "Rituximab",
"(Missing)"), class = "factor")), row.names = c(1L, 2L, 8L, 14L,
20L, 26L, 27L, 33L, 39L, 45L, 46L, 52L, 53L, 59L, 60L, 66L, 72L,
73L, 74L), class = "data.frame")