Could you use the log()
function in ggplot?
library(ggplot2)
library(scales)
# Using mtcars dataset
data(mtcars)
mtcars[1,"disp"] <- 1500
ggplot(mtcars, aes(x = log(disp), y = 1, color = log(disp))) +
geom_point(size = 5)
Created on 2025-04-10 with reprex v2.1.1