Python绘图报错‘c‘ argument looks like a single numeric RGB or RGBA sequence解决

问题描述

‘c’ argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with ‘x’ & ‘y’. Please use a 2-D array with a single row if you really want to specify the same RGB or RGBA value for all points.

可以出图,但会显示多行上述警告信息
在这里插入图片描述

解决方案

设置日志仅显示error级别的通知

from matplotlib.axes._axes import _log as matplotlib_axes_logger
matplotlib_axes_logger.setLevel('ERROR')

猜你喜欢

转载自blog.csdn.net/SL_World/article/details/108711914
今日推荐