Skip to content

Commit 63ed538

Browse files
committed
Merge remote-tracking branch 'ugurthemaster/patch-1'
Conflicts: examples/axes_grid/demo_floating_axes.py White space conflicts. While merging made minor style tweak to imports
2 parents 1c11929 + c813ab0 commit 63ed538

File tree

1 file changed

+17
-24
lines changed

1 file changed

+17
-24
lines changed

examples/axes_grid/demo_floating_axes.py

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
from matplotlib.transforms import Affine2D
2-
32
import mpl_toolkits.axisartist.floating_axes as floating_axes
4-
53
import numpy as np
64
import mpl_toolkits.axisartist.angle_helper as angle_helper
75
from matplotlib.projections import PolarAxes
8-
from mpl_toolkits.axisartist.grid_finder import FixedLocator, MaxNLocator, \
9-
DictFormatter
6+
from mpl_toolkits.axisartist.grid_finder import (FixedLocator, MaxNLocator,
7+
DictFormatter)
8+
import matplotlib.pyplot as plt
109

1110

1211
def setup_axes1(fig, rect):
@@ -122,28 +121,22 @@ def setup_axes3(fig, rect):
122121
return ax1, aux_ax
123122

124123

125-
if 1:
126-
import matplotlib.pyplot as plt
127-
fig = plt.figure(1, figsize=(8, 4))
128-
fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95)
129-
130-
ax1, aux_ax2 = setup_axes1(fig, 131)
131-
aux_ax2.bar([0, 1, 2, 3], [3, 2, 1, 3])
132-
133-
#theta = np.random.rand(10) #*.5*np.pi
134-
#radius = np.random.rand(10) #+1.
135-
#aux_ax1.scatter(theta, radius)
124+
##########################################################
125+
fig = plt.figure(1, figsize=(8, 4))
126+
fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95)
136127

137-
ax2, aux_ax2 = setup_axes2(fig, 132)
128+
ax1, aux_ax1 = setup_axes1(fig, 131)
129+
aux_ax1.bar([0, 1, 2, 3], [3, 2, 1, 3])
138130

139-
theta = np.random.rand(10)*np.pi/2
140-
radius = np.random.rand(10) + 1.
141-
aux_ax2.scatter(theta, radius)
131+
ax2, aux_ax2 = setup_axes2(fig, 132)
132+
theta = np.random.rand(10)*.5*np.pi
133+
radius = np.random.rand(10)+1.
134+
aux_ax2.scatter(theta, radius)
142135

143-
ax3, aux_ax3 = setup_axes3(fig, 133)
136+
ax3, aux_ax3 = setup_axes3(fig, 133)
144137

145-
theta = (8 + np.random.rand(10)*(14 - 8))*15. # in degrees
146-
radius = np.random.rand(10)*14000.
147-
aux_ax3.scatter(theta, radius)
138+
theta = (8 + np.random.rand(10)*(14-8))*15. # in degrees
139+
radius = np.random.rand(10)*14000.
140+
aux_ax3.scatter(theta, radius)
148141

149-
plt.show()
142+
plt.show()

0 commit comments

Comments
 (0)