我想缩小我绘制的这张图的轴尺寸。如您所见, (0.7 ; 1.0) 部分在两个轴上都无用,我想删除它们,以便图表居中并占据所有情节。
这是我的绘图代码的一部分:
# Annotating the plot.
plt.plot(U, V, 'o-', color='white', mec='black')
plt.annotate(patch_sd.name.title(),
xy=UV,
xytext=(-50, 30),
textcoords='offset points',
arrowprops=dict(arrowstyle='->', connectionstyle='arc3, rad=0.2'))
# Displaying the plot.
render(
standalone=True,
limits=(-0.1, 0.9, -0.1, 0.9),
x_tighten=True,
y_tighten=True)
谢谢!
答案 0 :(得分:1)
plt.xlim(0, 0.5)
plt.ylim(0, 0.5)