魔法函数%matplotlib 解决matplotlib画图在Jupter/IPython中不显示
用Python画图时,有时候画图结果存储在内存中不显示,如下图importseabornassnssubset=tz_counts[:10]sns.barplot(y=subset.index,x=subset.values)加上命令plt.show(),图就能显示,如图:但是,每次都这么输入比较麻烦,如果在Jupter中,可以使用魔法函数%matplotlibinline,这样就设置好了。如果是