title: matplotlib colorbar minor ticks color and number of minor ticks
body: <p>I have a matplotlib (v2.1.1) plot that includes a colorbar. When plotted on a figure with a white background, I get a colorbar as shown in one of the attached images. That is fine (though I'd love to know how to set the number of minor ticks).</p>
  
  <p><a href="https://i.stack.imgur.com/lFqMy.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lFqMy.jpg" alt="enter image description here"></a></p>
  
  <p>However when I set the background to black using <code>fig.patch.set_facecolor(back_color)</code> with <code>back_color = 'black'</code> I get a color bar which lacks the minor ticks and the multiplier at the top. I've already changed the color of the y tick labels manually, but can't find out how to change the minor tick or multiplier colors.</p>
  
  <p><a href="https://i.stack.imgur.com/Fmau2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fmau2.jpg" alt="enter image description here"></a></p>
  
  <p>[Edit] OK, here is a code which illustrates the problem. I solved the minor tick color problem, that leaves me with (in order of priority) the multiplier color &amp; the number of minor ticks. The code is below, change the background variable to 1 from 0 to see the multiplier.</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  background = 0
  if background == 0:
    back_color='black'
    fore_color='white'
  else:
    back_color='white'
    fore_color='black'
  fig, ax = plt.subplots()
  fig.patch.set_facecolor(back_color)
  im = ax.imshow([[1e5,2e5],[0.1e5,1e5]])
  ax.axis( 'off' )  # don't show the axes ticks/lines/etc. associated with the image
  cb = plt.colorbar(im)
  cb.formatter.set_scientific(True)
  cb.formatter.set_powerlimits((0,0))
  cbytick_obj = plt.getp(cb.ax, 'yticklabels' ) #Set y tick label color
  plt.setp(cbytick_obj, color=fore_color)
  cb.ax.tick_params(which = 'minor', length = 2, color = fore_color )
  cb.ax.tick_params(which = 'major', length = 4, color = fore_color )
  cb.ax.minorticks_on()
  cb.update_ticks()
  plt.show()
  </code></pre>