I have an example script that generates a histogram with two non-zero bins:
library(ggplot2)
# Make a dummy data set, containing 11 values on the interval (1,2), and a
# single value on the interval (3,4)
dftest <- data.frame(dummy_data=c(seq(1.1,1.9,0.08), 3.3))
# Create a histogram with 5 bins, on the interval (0,5)
hst <- ggplot(dftest, aes(x=dummy_data)) +
geom_histogram(breaks=seq(0,5,1)) +
theme_gray(base_size=18)
# Plot histogram with linear y-axis scaling; note there is a count present
# in the bin with edges (3,4)
print(hst)
# Plot histogram with logarithmic y-axis scaling; note the bin on the
# interval (3,4) cannot be displayed because the top of it is level
# with the plot baseline at 1e0.
print(hst + scale_y_log10())
The script produces two plots, which I've appended below:
In the logarithmic scaled version, how can I get geom_histogram()
to shift the rendered histogram baseline down below 1.0 (e.g., re-draw the baseline at 0.1, for example) so that the bin containing the single count may be seen?