经常能看到数据分析时导入三剑客之后还要在最后加一句%matplotlib.pyplot是为什么呢?
![](https://img.haomeiwen.com/i13530319/18b9749edf9bda54.png)
如果你在pycharm和spyder或者其他python的ID写上
%matplotlib.pyplot
都会报错
原因:
- 在使用jupyter notebook 或者jupyter qtconsole的时候,调用plot()函数绘画或生成一个figure画布时,可以在python conslot生成图像。
经常能看到数据分析时导入三剑客之后还要在最后加一句%matplotlib.pyplot是为什么呢?
如果你在pycharm和spyder或者其他python的ID写上
%matplotlib.pyplot
本文标题:%matplotlib.pyplot的作用?
本文链接:https://www.haomeiwen.com/subject/ovejoktx.html
网友评论