title: Tick labels in between colors (discrete colorer)
body: <p>Hi I want to put the ticklabels between colors (center of the intervals), and the figure is plotted by discrete colors. But the min value is not 0. How can I write the code to do that?
  I used following code to do that, but what I got is wrong...</p>
  <pre><code>n_clusters = len(cbar_tick_label)
  tick_locs = (np.arange(n_clusters)+0.5)*(n_clusters-1)/(n_clusters)
  cbar.set_ticks(tick_locs)
  cbar.set_ticklabels(cbar_tick_label)
  </code></pre>
  <p>This code is from question: <a href="https://stackoverflow.com/questions/42496357/discrete-color-bar-with-tick-labels-in-between-colors">Discrete Color Bar with Tick labels in between colors</a>. But it does not work when the min value of data is not zero.
  Thanks!</p>