在ipython中绘图时抑制对象的输出 [英] Suppress output of object when plotting in ipython

查看:98
本文介绍了在ipython中绘图时抑制对象的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在ipython中绘制直方图时是否可以抑制数组输出?

Is it possible to suppress the array output when plotting a histogram in ipython?:

例如:

plt.hist(OIR['Range'], bins, named=True, histtype='bar')

在显示图形之前输出/打印数组信息.

outputs/prints the array information before displaying the graph.

推荐答案

将返回值分配给变量(我称_表示未使用):

Assign the return value to a variable (which I call _ to indicate it's unused):

_ = plt.hist(...)

这篇关于在ipython中绘图时抑制对象的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆