我用ggplot2生成了以下图:
head(tab)
FC PVAL ID
SLC27A5 -1.902958 8.721649e-05 fatty acid transporter activity
ABAT 1.614133 1.423834e-04 metal cluster binding
PTDSS1 -1.129185 1.556689e-04 transferase activity
SIGMAR1 -1.226052 1.880870e-04 <NA>
PMVK -1.244247 3.207809e-04 transferase activity, transferring phosphorus-containing groups
B3GALNT2 -1.057636 4.188294e-04 transferase activity
p <- ggplot(data = tab, aes(x = FC, y = -log(PVAL), colour = ID, text = paste('gene: ', rownames(tab)))) + geom_point(alpha = 0.5) + theme_classic() + coord_cartesian(xlim = xlim) + theme(legend.position="none")
ggplotly(p)
see plot
因此点由id
着色(字符串的长度通常> 15个字母)。虽然情节很好,但是对应于id
(着色)的悬停标签被剪切了,我只看到了名称和点的一小部分(例如 transferase ... 转移酶活性)。你知道如何允许更大的(整个)名字吗?