【发布时间】:2020-11-02 17:46:29
【问题描述】:
如何将发散色条的白色部分移向最大值或最小值。
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import matplotlib as mpl
norm = mpl.colors.Normalize(vmin=0,vmax=600)
fig, ax = plt.subplots(figsize=(6, 1))
fig.subplots_adjust(bottom=0.5)
cb1 = mpl.colorbar.ColorbarBase(ax, cmap=cm.PiYG,
norm=norm,
orientation='horizontal')
cb1.set_label('Some Units')
fig.show()
【问题讨论】:
标签: python matplotlib colors colorbar