R ggplot2 - Simple plot- cannot specify log axis limits
问题 I'm trying to create a simple densityplot in R in ggplot2. Here's my code which 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 adjust the x-axis as I would like, into negative numbers. scale_x_log10(limits= c(1, 10000)) works great, but scale_x_log10(limits= c(-1, 10000)) does not work at all! It gives me this error: Error in if