title: python error name not defined
body: <p>I am following <a href="https://www.analyticsvidhya.com/blog/2014/12/image-processing-python-basics/" rel="nofollow noreferrer">https://www.analyticsvidhya.com/blog/2014/12/image-processing-python-basics/</a> to practice image processing.</p>
  
  <p>I am writing the code in an incremental way and checking if everything goes well. So far I have written the following code</p>
  
  <pre><code>from matplotlib import pyplot as plt
  from skimage import data
  from skimage.feature import blob_dog, blob_log, blob_doh
  from math import sqrt
  from skimage.color import rgb2gray
  import glob
  from skimage.io import imread
  
  example_file=glob.glob(r"/home/snowbell/sample.jpg")[0]
  im=imread(example_file, as_grey=True)
  plt.imshow(im, cmap=cm.gray)
  plt.show()
  </code></pre>
  
  <p>The image location and the image name is only thing I have changed. I am getting the following error:-</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 11, in &lt;module&gt;
      plt.imshow(im, cmap=cm.gray)
  NameError: name 'cm' is not defined
  </code></pre>