title: Matplotlib's "symlog" option: how to prevent curves that "come back"?
body: <p>I'm plotting data which extent, in x, from -1000 to 1000. But I'm only interested in the values between x = -1 and 0.</p>
  
  <p>I also want to plot on an x log scale. But since the x-values are negative, I cannot use xscale("log"). I can use xscale("symlog") though and this is the behaviour I want.</p>
  
  <p>Unfortunately, "symlog" seems to be broken. I cannot use the linthreshx argument with a value of less then 2 (the default?). But since I'm interested in x values from -1 to 0, I have to use that argument and set it to something like 1e-5 or even smaller.</p>
  
  <p>If I set linthreshx to something smaller then 1, the plot breaks. Here is a simple example, taken from <a href="https://stackoverflow.com/questions/3305865/what-is-the-difference-between-log-and-symlog">What is the difference between &#39;log&#39; and &#39;symlog&#39;?</a>:</p>
  
  <pre><code>import numpy
  from matplotlib import pyplot
  
  # Enable interactive mode
  pyplot.ion()
  
  # Draw the grid lines
  pyplot.grid(True)
  
  # Numbers from -50 to 50, with 0.1 as step
  xdomain = numpy.arange(-50,50, 0.1)
  
  # Plots a simple linear function 'f(x) = x'
  pyplot.plot(xdomain, xdomain)
  # Plots 'sin(x)'
  pyplot.plot(xdomain, numpy.sin(xdomain))
  
  pyplot.axis([-60,60,-1.5,1.5])
  
  pyplot.xscale('symlog', linthreshx=0.1)
  </code></pre>
  
  <p>Running that you'll see what I mean by the curve "coming back"... Here is the resulting image: <img src="https://i.stack.imgur.com/iphZM.png" alt="result"></p>
  
  <p>The problem seems to be that, on the x-axis, 0 is actually 10^0 = 1, not 0. Putting something smaller then 1 will make the line go back and the axis values are wrong (when hovering with the mouse and getting the x value).</p>
  
  <p>I might not be using the right tool though, but how to achieve what I want? I want the x axis to look like: -10^2    -10^1    -10^0    -10^-1    -10^-2    -10^-3   ... [up to my defined minimum exponent] ... 10^-3    10^-2    10^-1    10^0    10^1    10^2</p>
  
  <p>Thank you</p>