title: arranging image size matplotlib
body: <p>I take an image by <code>imread()</code> but the size of the figure is different from the image. Also when I save the figure, the white/grey space around the image is considered a part of the image. </p>
  
  <p>What I would like to have is to get an image, save it after some process and have an image with the same size and without white/grey space.</p>
  
  <p>Actually, what I try to do is to draw a graph on an image by using NetworkX package and save the figure which I use somewhere else. </p>
  
  <p>The code is simply like that; </p>
  
  <pre><code>import matplotlib.pyplot as plt 
  import networkx as nx 
  import matplotlib.image as mpimg 
  
  
  G = nx.cycle_graph(80) 
  pos = nx.circular_layout(G) 
  img = mpimg.imread(path1) 
  plt.imshow(img)
  
  nx.draw(G,pos) 
  nx.draw(G, pos=pos) 
  
  plt.axis('off')
  plt.show() 
  plt.savefig('test.png')
  </code></pre>
  
  <p>Regards </p>