Skip to content

Commit 7c16415

Browse files
authored
Merge pull request #7864 from anntzer/inset-locator-demo
Minor simplification of inset_locator_demo.
2 parents 9e6bee6 + 0772f02 commit 7c16415

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/axes_grid1/inset_locator_demo.py

+3-3
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)