import numpy as np import seaborn as sns import matplotlib.pyplot as plt plt.figure(figsize=(12, 6)) x = np.array(list("ABCDEFGHIJ")) y1 = np.arange(1, 11) sns.barplot(x=x, y=y1, palette="deep") # palette=rocket,deep 显示的颜色不同 plt.show()
显示效果:palette=rocket,deep两种效果