问题 Trying to plot a stacked histogram using ggplot : set.seed(1) my.df <- data.frame(param = runif(10000,0,1), x = runif(10000,0.5,1)) my.df$param.range <- cut(my.df$param, breaks = 5) require(ggplot2) not logging the y-axis: ggplot(my.df,aes_string(x = "x", fill = "param.range")) + geom_histogram(binwidth = 0.1, pad = TRUE) + scale_fill_grey() gives: But I want to log10+1 transform the y-axis to make it easier to read: ggplot(my.df, aes_string(x = "x", y = "..count..+1", fill = "param.range"))