我需要在图上显示具有极小值的点,即小于 10^-100。不幸的是,'ggplot' 停止显示该值的刻度标签。例如
library(ggplot2)
data <- data.frame(x =10^-(seq(0,250,by=20)),y= 10^-(seq(250,0,by=-20)))
ggplot(data,aes(x,y))+
geom_point()+
scale_x_log10(labels = trans_format("log10", math_format(10^.x)),
limits = c(10^-300,1),
breaks = 10^(seq(-300,0,by = 20)))+
scale_y_log10(labels = trans_format("log10", math_format(10^.x)),
limits = c(10^-300,1),
breaks = 10^(seq(-300,0,by = 20)))+
theme_classic()
如你所见,我尝试设置限制,并手动设置刻度(
brakes
选项)。虽然没有效果。谷歌搜索和 SO 搜索都没有答案。