我已将数据重新缩放到ggtree调用中的log10,但想在图例中看到原始值作为标签
我看到..并希望-> ..
有没有一种方法可以在的调用中添加转换
scale_fill_discrete(name = "", labels = ...)
或其他将原始值显示为图例标签的东西 我当前的ggtree代码是
gheatmap(p2, log(annot,10), offset=0.2, width=0.2, low="white", high="black", colnames_position = "top", font.size=2) +
labs(fill = "") +
theme(
legend.title = element_text(color = "black", size = 10),
legend.text = element_text(color = "red", size = 6),
legend.key.size = unit(0.75, "lines"),
legend.position="bottom",
legend.box = "horizontal",
legend.justification="right"
)
这是情节正常但图例单位已记录的初始版本。
我尝试使用转换函数,该转换函数会导致一个漂亮的图例框,但我希望转换后的提示标签现在变得混乱。
gheatmap(p2.species, annot.species, offset=os.val, width=wd.val, low="white", high="black", colnames_position = "top", font.size=fs.val) +
scale_y_log10() +
labs(fill = "") +
theme(
legend.title = element_text(color = "black", size = 10),
legend.text = element_text(color = "red", size = 6),
legend.key.width = unit(2, "lines"),
legend.position="bottom",
legend.box = "horizontal",
legend.justification="right",
plot.margin=margin(30, 30, 30, 30)
)