Как вообще не устанавливать «галочки» на цветовой панели?Python

Программы на Python
Anonymous
Как вообще не устанавливать «галочки» на цветовой панели?

Сообщение Anonymous »


I want to set the colorbar with no ticks in any form. I've searched and set the tick parameter at two places. However, still there are some ticks at right boarder.

cb = mpl.colorbar.ColorbarBase(ax2, cmap=cmap, norm=norm, spacing='proportional', boundaries=bounds, format='%.1f') ax2.set_xlabel('t', size=12) cb.ax.tick_params(size=0) # these two lines are my searching effort cb.set_ticks([]) plt.show()
Изображение



Источник: https://stackoverflow.com/questions/781 ... -color-bar

Вернуться в «Python»