在 ggplot2 中,我有一个图表,其 y 轴位于 log10(x+1) 上。我还没有找到直接指定 ggplot2 使用 log10(x+1) 刻度的方法,所以我想直接修改 y 轴刻度标签,而不是“0、0.5、1、1.5 和 2” ” 这些刻度将显示为“0, 3.2, 10, 32, 100”。有一个简单的方法可以做到这一点吗?
代码:
ibero.all <- ggplot(melted.LOG.Ibero, aes(colour=cultures, x = factor(Laplace, levels=c("B", "G", "T", "Bc", "PD.LD", "DT6", "DT1.5.7.8", "Gm1", "Gm2.8", "F", "P", "L.R", "A", "D", "Dv")), y = Frequency)) +
geom_point(position = position_dodge(width = 0.4))+
scale_color_manual(name="", values=group.colors.Ibero)+
ylim(0, 2)+
labs(y = "Percentage of the toolkit", x="Typed tool classes (Laplace 1964)")+
ggtitle("Madeleine clones of sample size 100, tool frequencies (log scale)")+
theme(plot.title = element_text(hjust = 0.5))
I would like to change just the tick labels to make them look like this: