对同一线条的各个段或者特殊点, 用不同的颜色. 参考下面 http://stackoverflow.com/questions/30121773/python-is-it-possible-to-change-line-color-in-a-plot-if-exceeds-a-specific-rang http://matplotlib.org/examples/pylab_examples/multicolored_line.html 转载于:https://www.cnblogs.com/qingyuanjushi/p/6097532.html