(Posting form same working team as OP)
It's not sufficient to simply transform the data to log2. We would like to only modify the scales and x-ticks. But the underlying numbers are the same.
This example from the documentation seems most relevant. You can still read the graph and say "Lots of animals have a body weight around 10".
I think this likely solves the problem
t = tibble(x = c(0, 0, 0, 1, 1, 1, 10, 10, 10, 100, 100, 100, 1000, 1000, 1000));
p = t %>%
ggplot(aes(x = x)) +
geom_histogram() +
scale_x_continuous(
trans = scales::pseudo_log_trans(base = 10),
breaks = scales::trans_breaks("log10", function(x) 10^x),
labels = scales::trans_format("log10", scales::math_format(10^.x))
)
But there are a few warnings about NaNs produced to track. down.
Additionally, this only creates one tick, at 10^2. The tick at 10^3 does not show up, nor the ticks at 10^1 or 10^0. This is odd.