I am trying to create a simple density graph in R in ggplot2. Here is my code that works great.
d <- ggplot(result, aes(x=result$baseMeanA))
d + geom_density(colour="darkgreen", size=2, fill="darkgreen") +
scale_x_log10() + scale_y_continuous(limits = c(0, 0.45))
The problem is that I cannot set the x axis, as I would like, to negative numbers.
scale_x_log10(limits= c(1, 10000))
works fine but
scale_x_log10(limits= c(-1, 10000))
not working at all! This gives me this error:
Error if (zero_range (range)) {: missing value requiring TRUE / FALSE
Please, help!
source
share