title: Module 'matplotlib' has no attribute 'colors' error
body: <p>Good afternoon,</p>
  <p>I am running Python 3.9.2 on my Mac (Mac OS Big Sur 11.2.3), and when running my code, that includes:</p>
  <pre><code>    import matplotlib.pylab as plt
               (...)
      cm = plt.get_cmap('viridis')
      cNorm = plt.colors.Normalize(vmin=min(forces), vmax=max(forces))
      scalarMap = cmx.ScalarMappable(norm=cNorm, cmap=cm)
  </code></pre>
  <p>I get the error:</p>
  <pre><code>    cNorm = plt.colors.Normalize(vmin=min(forces), vmax=max(forces))
      AttributeError: module 'matplotlib.pylab' has no attribute 'colors'
  </code></pre>
  <p>I have tried uninstalling and installing matplotlib (both with conda and pip), and that didn't work. I tried installing different versions of matplotlib, and that didn't work either. I looked at <a href="https://stackoverflow.com/questions/47497097/module-matplotlib-has-no-attribute-colors">this thread</a> but it didn't answer my questions.</p>
  <p>I don't understand what the issue is here, since the code was provided by my instructor, and since the error is for the second use of plt, the error is not with the import of matplotlib.</p>
  <p>Please let me know if you know what the issue is, or what I could try to fix this. Thank you.</p>