R,ggpubr:在对数刻度轴上禁用指数并改为使用整数

问题描述 投票:1回答:1

我试图在y轴和x轴上使用对数刻度绘制我的数据。但是,我想在我的情节上以对数刻度禁用指数表示法。而不是10 ^ 0,10 ^ 1,10 ^ 2,我想要1,10,100 ......

请问,我怎样才能在ggpubr包中实现这一目标?

enter image description here

虚拟数据:

require(ggpubr)

data(cars)
p <- ggscatter(cars, x = "speed", y = "dist")

p + yscale("log10", .format = TRUE)
r logarithm ggpubr
1个回答
3
投票

format设置为FALSE(默认值)可以:

p + yscale("log10")

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.