AttributeError: 'module' object has no attribute 'to_rgba'

import matplotlib.pyplot as plt
import numpy as np

x = np.arange(20)
y = x**2

plt.plot(x, y)

在jupyter notebook中使用matplotlib画图出现这个错误,修正方法:

sudo pip install matplotlib==2.2.0

猜你喜欢

转载自blog.csdn.net/zhhp1001/article/details/85256473