Plot negative values in logarithmic scale with ggplot 2
问题 I need to plot with ggplot2 package in R a graph with some negative values using an x logarithmic scale. For example I want to plot these points using an x logarithmic scale x <- c(-1,-10,-100) y <- c(1,2,3) I know that the logarithm of a negative value in R pronuces a NA value, but I need a result like this:click to view the picture Is it possible usign ggplot2? 回答1: There are two problems to solve - calculate log from negative values and then combine logarithmic scale and reverse scale. To