Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0772f02

Browse files
committed
Minor simplification of inset_locator_demo.
1 parent 2374c9b commit 0772f02

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/axes_grid1/inset_locator_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def add_sizebar(ax, size):
1717
fig, (ax, ax2) = plt.subplots(1, 2, figsize=[5.5, 3])
1818

1919
# first subplot
20-
ax.set_aspect(1.)
20+
ax.set_aspect(1)
2121

2222
axins = inset_axes(ax,
2323
width="30%", # width = 30% of parent_bbox
@@ -29,9 +29,9 @@ def add_sizebar(ax, size):
2929

3030

3131
# second subplot
32-
ax2.set_aspect(1.)
32+
ax2.set_aspect(1)
3333

34-
axins = zoomed_inset_axes(ax2, 0.5, loc='upper right') # zoom = 0.5
34+
axins = zoomed_inset_axes(ax2, zoom=0.5, loc='upper right')
3535
# fix the number of ticks on the inset axes
3636
axins.yaxis.get_major_locator().set_params(nbins=7)
3737
axins.xaxis.get_major_locator().set_params(nbins=7)

0 commit comments

Comments
 (0)