title: Histogram with "negative" logarithmic scale in R
body: <p>I have a dataset with some outliers, such as the following</p>
  
  <pre><code>x &lt;- rnorm(1000,0,20)
  x &lt;- c(x, 500, -500)
  </code></pre>
  
  <p>If we plot this on a linear x axis scale at this we see</p>
  
  <pre><code>histogram(x)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/lD0Qn.jpg" alt="non log x-axis"></p>
  
  <p>I worked out a nice way to put it on a log scale using this useful thread: 
  <a href="https://stackoverflow.com/questions/4149214/how-to-use-a-log-scale-for-y-axis-of-histogram-in-r">how to use a log scale for y-axis of histogram in R?</a> :</p>
  
  <pre><code>mat &lt;- data.frame(x)
  ggplot(ee, aes(x = xx)) + geom_histogram(colour="darkblue", size=1, fill="blue") + scale_x_log10()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/au1hz.jpg" alt="log x-axis"></p>
  
  <p>However, I would like the x axis labels from this 2nd example to match that of the first example, except with a kind of "negative log" - i.e. first tick (moving from the centre to the left) could be -1, then the next could be -10, the next -100, but all equidistant. Does that make sense?</p>