|
| 1 | +# Import necessary libraries and modules |
1 | 2 | from matplotlib.transforms import Affine2D
|
2 |
| - |
3 | 3 | import mpl_toolkits.axisartist.floating_axes as floating_axes
|
4 |
| - |
5 | 4 | import numpy as np
|
6 | 5 | import mpl_toolkits.axisartist.angle_helper as angle_helper
|
7 | 6 | from matplotlib.projections import PolarAxes
|
8 | 7 | from mpl_toolkits.axisartist.grid_finder import FixedLocator, MaxNLocator, \
|
9 | 8 | DictFormatter
|
| 9 | +import matplotlib.pyplot as plt |
| 10 | + |
10 | 11 |
|
11 | 12 | def setup_axes1(fig, rect):
|
12 | 13 | """
|
@@ -127,31 +128,28 @@ def setup_axes3(fig, rect):
|
127 | 128 |
|
128 | 129 |
|
129 | 130 |
|
130 |
| -if 1: |
131 |
| - import matplotlib.pyplot as plt |
132 |
| - fig = plt.figure(1, figsize=(8, 4)) |
133 |
| - fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95) |
| 131 | +########################################################## |
| 132 | +fig = plt.figure(1, figsize=(8, 4)) |
| 133 | +fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95) |
134 | 134 |
|
135 |
| - ax1, aux_ax2 = setup_axes1(fig, 131) |
136 |
| - aux_ax2.bar([0, 1, 2, 3], [3, 2, 1, 3]) |
| 135 | +ax1, aux_ax2 = setup_axes1(fig, 131) |
| 136 | +aux_ax2.bar([0, 1, 2, 3], [3, 2, 1, 3]) |
137 | 137 |
|
138 |
| - #theta = np.random.rand(10) #*.5*np.pi |
139 |
| - #radius = np.random.rand(10) #+1. |
140 |
| - #aux_ax1.scatter(theta, radius) |
141 |
| - |
142 |
| - |
143 |
| - ax2, aux_ax2 = setup_axes2(fig, 132) |
| 138 | +#theta = np.random.rand(10) #*.5*np.pi |
| 139 | +#radius = np.random.rand(10) #+1. |
| 140 | +#aux_ax1.scatter(theta, radius) |
144 | 141 |
|
145 |
| - theta = np.random.rand(10)*.5*np.pi |
146 |
| - radius = np.random.rand(10)+1. |
147 |
| - aux_ax2.scatter(theta, radius) |
| 142 | +ax2, aux_ax2 = setup_axes2(fig, 132) |
148 | 143 |
|
| 144 | +theta = np.random.rand(10)*.5*np.pi |
| 145 | +radius = np.random.rand(10)+1. |
| 146 | +aux_ax2.scatter(theta, radius) |
149 | 147 |
|
150 |
| - ax3, aux_ax3 = setup_axes3(fig, 133) |
| 148 | +ax3, aux_ax3 = setup_axes3(fig, 133) |
151 | 149 |
|
152 |
| - theta = (8 + np.random.rand(10)*(14-8))*15. # in degrees |
153 |
| - radius = np.random.rand(10)*14000. |
154 |
| - aux_ax3.scatter(theta, radius) |
| 150 | +theta = (8 + np.random.rand(10)*(14-8))*15. # in degrees |
| 151 | +radius = np.random.rand(10)*14000. |
| 152 | +aux_ax3.scatter(theta, radius) |
155 | 153 |
|
156 |
| - plt.show() |
| 154 | +plt.show() |
157 | 155 |
|
0 commit comments