Seaborn子图报错“attributeerror: no attribute ‘fill_betweenx‘” (seaborn error on subplots)

seaborn 画多子图产生这个问题:

“attributeerror: ‘numpy.ndarray’ object has no attribute ‘fill_betweenx’”

attributeerror: 'numpy.ndarray' object has no attribute 'fill_betweenx'

这是因为在选择子图坐标是,我是2X4的子图,二维的,不能用一位的 0-7去表示ax, 用用 [0][1]这样的后缀去表示。

该问题和这个帖子很像Axes from plt.subplots() is a “numpy.ndarray” object and has no attribute “plot”

Seaborn子图报错“attributeerror: no attribute ‘fill_betweenx‘” (seaborn error on subplots)_第1张图片

seaborn error for subplots

I try to make subplots for seaborn (sns), but found error of “attributeerror: ‘numpy.ndarray’ object has no attribute ‘fill_betweenx’”. It is because I should use suffix such as ax[0][1] for the chosen subplot than ax[1] directly.

This blog give me some remind for the ax number choice though they are different but similar - Axes from plt.subplots() is a “numpy.ndarray” object and has no attribute “plot”

你可能感兴趣的:(画图,Python,问题解决,python)