这是由于matplotlib 3.0.0中的错误所致。在matplotlib 3.0.1中不应出现该错误。
您有以下选择:
- 更新到matplotlib 3.0.1
绘图前在jupyter笔记本中设置以下选项
%config InlineBackend.print_figure_kwargs = {'bbox_inches':None}使用
%matplotlib notebook
后端而不是后端%matplotlib inline
。

这是由于matplotlib 3.0.0中的错误所致。在matplotlib 3.0.1中不应出现该错误。
您有以下选择:
绘图前在jupyter笔记本中设置以下选项
%config InlineBackend.print_figure_kwargs = {'bbox_inches':None}使用
%matplotlib notebook后端而不是后端
%matplotlib inline。