f = plt.figure() ax = f.add_subplot(1,1,1) mat = np.arange(100).reshape((10, 10)) i = ax.imshow(mat, cmap= 'viridis') cb = f.colorbar(i) cb.ax.tick_params(size=0) #Remove ticks cb.outline.set_visible(False) #Remove outline