python在list里重复绘图报错AttributeError: 'PathCollection' object has no attribute 'subplots'

img

img


创造一个list 里面都是csv文件 然后想一次把所有list里的图画出来 提示报错AttributeError: 'PathCollection' object has no attribute 'subplots' 求大佬解答

img


是不是应该是plt变量 不是 plt2

The error message "AttributeError: 'PathCollection' object has no attribute 'subplots'" typically occurs when you try to call the subplots method on a PathCollection object, which does not have this method.

A PathCollection object is usually returned by the scatter method in Matplotlib when creating a scatter plot. It represents a collection of scatter plot markers.

看起来像是无意中,你的plt对象已经变成了PathCollection对象。另外,你也得确保确实已经添加了subplot().