matplotlib窗口在光标移动时会不规则地更改大小

时间:2019-01-10 12:26:14

标签: python matplotlib

使用下面的代码,当我将鼠标悬停在上面时,我会得到一个窗口,该窗口会不规则地更改大小。我在做什么错了?

(我在使用Python 3.6和matplotlib 2.2.2的Ubuntu 18上)

enter image description here

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()

0 个答案:

没有答案