python - 为什么 Jupyter notebook 在 matplotlib xlabel() 之后会打印文本?
问题描述
MWE:
import matplotlib.pyplot as plt
import numpy as np
x = np.random.rand(100)
y = np.random.rand(100)
plt.scatter(x, y)
plt.xlabel('x')
输出:
为什么会显示Text(0.5, 0, 'x')
,我该如何抑制它?
我怀疑它是xlabel()
函数的输出,但我在文档中没有看到任何关于返回值的信息。
解决方案
推荐阅读
- python - 循环遍历多个数据帧并创建日期时间索引然后加入数据帧
- javascript - 如何使用 JS 随机化我的输入位置?
- sql - 如何计算带有滚动日期窗口的 SAS PROC SQL 的不同?
- wordpress - 更改特定 Woocommerce 产品类别存档页面的默认排序
- django - 在 CircleCI 上运行 Django - psycopg2.OperationalError:无法连接到服务器:连接被拒绝
- django - django 中用于 GenericRelation 的 DRF 可写序列化程序
- websphere-liberty - 在 server.xml 中使用 maven 过滤而不破坏 mvn liberty:dev
- c++ - 如何确保 boids 100% 的时间避开墙壁
- javascript - 希望在页面导航栏中突出显示滚动(从左到右)
- ocaml - 为什么流类型的这个 flatten 函数会给我这个错误?