在Jupyter Notebook 中显示矢量图

使用matplotlib库在Jupyter笔记本中画图时,显示出来的图很模糊,加上以下代码可以使图像以矢量图格式显示,看起来更加清晰:

import matplotlib.pyplot as plt

%matplotlib inline
%config InlineBackend.figure_format = 'svg'

如果想保存矢量图,后缀名为.eps或者.pdf即可.

猜你喜欢

转载自www.cnblogs.com/excellent-ship/p/9118373.html
今日推荐