gpt4 book ai didi

python - 更改 python matplotlib python 图的配色方案

转载 作者:太空宇宙 更新时间:2023-11-03 14:26:15 25 4
gpt4 key购买 nike

<分区>

我想为我的 python 图设置一个配色方案,这样它们就不会像下面所示的顶部图中的 A 和 H 那样重复相同的颜色。 (对不起,如果它很难看)。 enter image description here

我使用的代码很简单,

ax1.plot(sections,A,label='A',linewidth=2) ax1.plot(sections,B,label='B',linewidth=2) ax1.plot(sections,C,label='C',linewidth=2) ax1.plot(sections,D,label='D',linewidth=2) ax1.plot(sections,E,label='E',linewidth=2) ax1.plot(sections,F,label='F',linewidth=2) ax1.plot(sections,G,label='G',linewidth=2) ax1.plot(sections,H,label='H',linewidth=2)

设置配色方案的最佳方式是什么?正在使用 colourmap 功能吗?感谢您的帮助!

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com