Answers for "colorbar remove tick lines and border"

0

colorbar remove tick lines and border

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
Posted by: Guest on May-03-2021

Python Answers by Framework

Browse Popular Code Answers by Language