I want to reduce the axis size of this diagram that I have plotted. As you see the (0.7 ; 1.0) part is useless on both axis and I want to remove them so the diagram is well centered and takes all the plot.
Here is the part of my code for the plotting :
JavaScript
x
18
18
1
# Annotating the plot.
2
3
plt.plot(U, V, 'o-', color='white', mec='black')
4
plt.annotate(patch_sd.name.title(),
5
xy=UV,
6
xytext=(-50, 30),
7
textcoords='offset points',
8
arrowprops=dict(arrowstyle='->', connectionstyle='arc3, rad=0.2'))
9
10
# Displaying the plot.
11
12
render(
13
standalone=True,
14
limits=(-0.1, 0.9, -0.1, 0.9),
15
x_tighten=True,
16
y_tighten=True)
17
18
Thank you !
Advertisement
Answer
JavaScript
1
3
1
plt.xlim(0, 0.5)
2
plt.ylim(0, 0.5)
3