How to set same color for markers and lines in a matplotlib plot loop?

后端 未结 3 1429
孤城傲影
孤城傲影 2021-02-05 05:52

I have to plot multiple lines and markers with matplotlib by creating a loop and I have already set the axes color cycle in the matplolibrc param file. In each cycle of the loop

3条回答
  •  孤街浪徒
    2021-02-05 06:02

    Note that in matplotlib 1.5 onwards, color_cycle has been replaced by prop_cycler. The first option then needs:

    color = next(ax._get_lines.prop_cycler)['color']
    

提交回复
热议问题