title: plotting both x and y axis in log scale in pandas using matplotlib
body: <p>My trace file can be downloaded from <a href="https://gist.github.com/ecenm/25df526d4398af2c3e41ae6df6c51155" rel="nofollow noreferrer">here</a>.</p>
  
  <p>When I plot only y axis in log scale. everything is fine</p>
  
  <pre><code>import pandas as pd
  import numpy
  import matplotlib.pyplot as plt
  
  iplevel = pd.read_csv('iplevel.csv')
  fig = plt.figure()
  #plt.xscale('log')
  plt.yscale('log')
  plt.title(' Size Vs Duration (at IP level) for ')
  
  plt.xlabel('Duration (in seconds)')
  plt.ylabel('Size (in bytes)')
  plt.scatter(iplevel['Time'], iplevel['Length'])
  fig.tight_layout()
  fig.savefig('iplevel_timevdur.png', dpi=fig.dpi)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/cmCax.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cmCax.png" alt="Only y axis in log scale"></a></p>
  
  <p>When I plot both x and y axis in log scale, something strange happens</p>
  
  <pre><code>import pandas as pd
  import numpy
  import matplotlib.pyplot as plt
  
  iplevel = pd.read_csv('iplevel.csv')
  fig = plt.figure()
  plt.xscale('log')
  plt.yscale('log')
  plt.title(' Size Vs Duration (at IP level) for ')
  
  plt.xlabel('Duration (in seconds)')
  plt.ylabel('Size (in bytes)')
  plt.scatter(iplevel['Time'], iplevel['Length'])
  fig.tight_layout()
  fig.savefig('iplevel_timevdur.png', dpi=fig.dpi)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/G9upW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G9upW.png" alt="enter image description here"></a></p>
  
  <p>I am not sure where I am going wrong. Any ideas/suggestions welcome</p>