python - matplotlib 窗口在光标移动时不规则地改变大小
问题描述
使用下面的代码,我得到一个窗口,当我将鼠标悬停在它上面时,它会不规则地改变大小。我究竟做错了什么?
(我在 Ubuntu 18 上使用 Python 3.6 和 matplotlib 2.2.2)
fig,axs = plt.subplots(3,1,figsize=(4,6))
#fill each axis with standard ax.plot commands
[ax.set_ylim([-2,2]) for ax in axs]
[ax.text(x=1.1,y=0,s=f"$f_{{{i+1}}}-f_{{{i}}}$") for i,ax in enumerate(axs)]
fig.subplots_adjust(
left = 0.1, # the left side of the subplots of the figure
right = 0.7 , # the right side of the subplots of the figure
bottom = 0.1 , # the bottom of the subplots of the figure
top = 0.9 , # the top of the subplots of the figure
wspace = 0.9 , # the amount of width reserved for blank space between subplots
hspace = 0.9 , # the amount of height reserved for white space between subplots
)
plt.show()
解决方案
推荐阅读
- go - Keep-alive:死节点检测
- arrays - 如何遍历具有不同类型的类数组并快速打印它们的属性?
- mongodb - 在 Julia 中使用 SSL 证书连接到 Mongodb
- python - 通过字符串调用函数
- jquery - 加载页面时如何加载模式
- c# - System.InvalidOperationException:没有进程与此对象关联
- python - Python在父初始化中创建子对象并访问父属性
- azure-devops - 在 Azure DevOps 中设置权限
- html - 将复选框与标签对齐并为选中的复选框添加背景颜色
- android - Admob 广告未显示在我的 Android 应用中