Skip to content

Commit 6a982b4

Browse files
committed
slight improvement on demo_floating_axes.py
1 parent 7352a1d commit 6a982b4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

examples/axes_grid/demo_floating_axes.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ def setup_axes1(fig, rect):
1919
ax1 = floating_axes.FloatingSubplot(fig, rect, grid_helper=grid_helper)
2020
fig.add_subplot(ax1)
2121

22+
aux_ax = ax1.get_aux_axes(tr)
23+
2224
grid_helper.grid_finder.grid_locator1._nbins = 4
2325
grid_helper.grid_finder.grid_locator2._nbins = 4
2426

25-
return ax1
27+
return ax1, aux_ax
2628

2729

2830
def setup_axes2(fig, rect):
@@ -130,8 +132,9 @@ def setup_axes3(fig, rect):
130132
fig = plt.figure(1, figsize=(8, 4))
131133
fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95)
132134

133-
ax1 = setup_axes1(fig, 131)
134-
135+
ax1, aux_ax2 = setup_axes1(fig, 131)
136+
aux_ax2.bar([0, 1, 2, 3], [3, 2, 1, 3])
137+
135138
#theta = np.random.rand(10) #*.5*np.pi
136139
#radius = np.random.rand(10) #+1.
137140
#aux_ax1.scatter(theta, radius)

0 commit comments

Comments
 (0)