Matplotlib 1.5 usage of axes.prop_cycle

前端 未结 2 1834
孤城傲影
孤城傲影 2021-01-11 19:04

axes.color_cycle is deprecated in Matplotlib 1.5. However its usage was quite straightforward: we could easily grab a specific color by:

plt.rc         


        
2条回答
  •  心在旅途
    2021-01-11 19:23

    colors = [color['color'] for color in list(mpl.rcParams['axes.prop_cycle'])]
    colors[1]
    

    is a way to restore the old use. First line returns a 2-D array of colors.

提交回复
热议问题