title: Matplotlib: different scale on negative side of the axis
body: <p><strong>Background</strong></p>
  
  <hr>
  
  <p>I am trying to show three variables on a single plot. I have connected the three points using lines of different colours based on some other variables. This is shown here <a href="https://i.stack.imgur.com/granj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/granj.png" alt="figure here"></a> </p>
  
  <hr>
  
  <p><strong>Problem</strong></p>
  
  <hr>
  
  <p>What I want to do is to have a different scale on the negative x-axis. This would help me in providing positive x_ticks, different axis label and also clear and uncluttered representation of the lines on left side of the image </p>
  
  <hr>
  
  <p><strong>Question</strong></p>
  
  <hr>
  
  <ul>
  <li>How to have a different positive x-axis starting from 0 towards negative direction?</li>
  <li>Have xticks based on data plotted in that direction</li>
  <li>Have a separate xlabel for this new axis</li>
  </ul>
  
  <hr>
  
  <p><strong>Additional information</strong></p>
  
  <hr>
  
  <p>I have checked other questions regarding inclusion of multiple axes e.g. <a href="https://stackoverflow.com/questions/9103166/multiple-axis-in-matplotlib-with-different-scales">this</a>  and <a href="https://stackoverflow.com/questions/44925543/python-matplotlib-how-to-move-the-scale-to-the-other-side-of-the-axis">this</a>. However, these questions did not serve the purpose.</p>
  
  <p><strong>Code Used</strong></p>
  
  <pre><code>font_size = 20
  plt.rcParams.update({'font.size': font_size})
  
  fig = plt.figure()
  ax = fig.add_subplot(111)
  #read my_data from file or create it
  
  for case in my_data:
  
      #Iterating over my_data
  
      if condition1 == True:
          local_linestyle = '-'
          local_color = 'r'
          local_line_alpha = 0.6
      elif condition2 == 1:
          local_linestyle = '-'
          local_color = 'b'
          local_line_alpha = 0.6
      else:
          local_linestyle = '--'
          local_color = 'g'
          local_line_alpha = 0.6
  
      datapoint = [case[0], case[1], case[2]]
  
      plt.plot(datapoint[0], 0, color=local_color)
      plt.plot(-datapoint[2], 0, color=local_color)
      plt.plot(0, datapoint[1], color=local_color)
      plt.plot([datapoint[0], 0], [0, datapoint[1]], linestyle=local_linestyle, color=local_color)
      plt.plot([-datapoint[2], 0], [0, datapoint[1]], linestyle=local_linestyle, color=local_color)
  plt.show()
  exit()
  </code></pre>