library(ggpubr)
p1 <- ggdotchart(dfm, x="X2", y = "X3",
color = "X1",
palette = c("red", "Orange", "blue", "green", "VioletRed", "black"),
sorting = "descending",
add = "segments",
add.params = list(color = "X1", size = 2),
rotate = TRUE,
group = "X1",
dot.size = 6,
legend.title = "",
label = round(dfm$X3),
font.label = list(color = "white", size = 7, vjust = 0.5),
ggtheme = theme_pubr(base_size = 8, legend = "right"), xlab = "", ylab = "Number of transcripts") +
theme(legend.text = element_text(size = 8, color = "black", face = "bold"))
p1
ggsave(p1, filename = "KEGG_Dort.png", dpi = 500, width = 11, height = 7)