como exibir todos os intervalos na barra de cores usando matplotlib

Este é o meu código. Eu mencionei aqui 50 intervalos, quando eu arrasto o controle deslizante, só tenho 6 ou 7 intervalos, mas quero exibir todos os meus intervalos na barra de cores. Então, qualquer um pode me guiar. Agradeço antecipadamente.

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider, Button
import matplotlib.colors
ax = plt.subplot(111)
plt.subplots_adjust(left=0.25, bottom=0.25)
img_data = np.random.rand(50,50)

c_max = 2
img = ax.imshow(img_data, interpolation='nearest')
cb = plt.colorbar(img)
axcolor = 'lightgoldenrodyellow'
ax_cmax  = plt.axes([0.25, 0.15, 0.65, 0.03])
s_cmax = Slider(ax_cmax, 'max', 0, 50, valfmt=c_max)
def update(val, s=None):
    # _cmin = s_cmin.val
    _cmax = s_cmax.val
    img.set_clim(_cmax)
    plt.draw()
s_cmax.on_changed(update)

plt.show()

questionAnswers(1)

yourAnswerToTheQuestion