data_new <- data[which(data$cancer_type == ‘KIRP’),]
ggplot(data = data_new,
aes(axis1 = lncRNAscore_Subtype, axis2 = TCGA_Subtype)) +
scale_x_continuous(breaks = c(1,2),labels = c( “lncRNAscore_Subtype”, “TCGA_Subtype”)) +
geom_alluvium(aes(fill = lncRNAscore_Subtype)) +
geom_flow(width = 1) + #控制方块间隙宽窄
geom_stratum(width = 0.1) +
geom_text(stat = “stratum”, aes(label = after_stat(stratum))) +
theme_minimal()