在ggplot2中,我有一个图表,其y轴是基于log10(x+1)的。我没有找到一种直接指定ggplot2使用log10(x+1)刻度的方法,因此我想直接修改y轴刻度标签,使这些刻度读作“0、3.2、10、32和100”,而不是“0、0.5、1、1.5和2”。有简单的方法可以实现这个吗?
代码:
我想仅更改刻度标签的样式,使它们看起来像这样:
代码:
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))
我想仅更改刻度标签的样式,使它们看起来像这样:
![enter image description here](https://istack.dev59.com/KuojZ.webp)