如何更改放大的子图的大小

时间:2020-08-26 22:58:25

标签: python matplotlib seaborn subplot axes

我正在尝试放大散点图的区域,但是放大的区域与原始图的大小相同。无论如何,可以在不更改原始图的情况下设置放大子图的大小?这是我的代码:

fig,ax = plt.subplots(figsize=(8,8))
sns.scatterplot(x="Pass_Yds", y="Pass_TD",
                     hue="Rnd",style='Power_five',size='AP1',sizes= (100, 300),
                    palette='hot',legend='full', s=100,data=df[df['Position Standard']=='QB'],ax=ax)
axins = zoomed_inset_axes(ax,15,loc=4)
sns.scatterplot(x="Pass_Yds", y="Pass_TD",
                     hue="Rnd",style='Power_five',size='AP1',sizes= (100, 300),
                    palette='hot', s=100,legend=False,data=df[df['Position Standard']=='QB'],ax=axins)
x1, x2, y1, y2 = 0, 3000, 0, 50 # specify the limits
axins.set_xlim(x1, x2) # apply the x-limits
axins.set_ylim(y1, y2) # apply the y-limits
plt.yticks(visible=False)
plt.xticks(visible=False)

它产生以下情节: [1]:https://i.stack.imgur.com/0nnqa.png

0 个答案:

没有答案