title: Scientific notation colorbar in matplotlib
body: <p>I am trying to put a colorbar to my image using matplotlib. The issue comes when I try to force the ticklabels to be written in scientific notation. How can I force the scientific notation (ie, 1x10^0, 2x10^0, ..., 1x10^2, and so on) in the ticks of the color bar?</p>
  
  <p>Example, let's create and plot and image with its color bar:</p>
  
  <pre><code>import matplotlib as plot
  import numpy as np
  
  img = np.random.randn(300,300)
  myplot = plt.imshow(img)
  plt.colorbar(myplot)
  plt.show()
  </code></pre>
  
  <p>When I do this, I get the following image:</p>
  
  <p><img src="https://i.stack.imgur.com/s5SVO.png" alt="image created with the previous code"></p>
  
  <p>However, I would like to see the ticklabels in scientific notation... Is there any one line command to do this? Otherwise, is there any hint out there? Thanks!</p>