|
1 | 1 | from matplotlib.transforms import Affine2D
|
2 |
| - |
3 | 2 | import mpl_toolkits.axisartist.floating_axes as floating_axes
|
4 |
| - |
5 | 3 | import numpy as np
|
6 | 4 | import mpl_toolkits.axisartist.angle_helper as angle_helper
|
7 | 5 | 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 |
10 | 9 |
|
11 | 10 |
|
12 | 11 | def setup_axes1(fig, rect):
|
@@ -122,28 +121,22 @@ def setup_axes3(fig, rect):
|
122 | 121 | return ax1, aux_ax
|
123 | 122 |
|
124 | 123 |
|
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) |
136 | 127 |
|
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]) |
138 | 130 |
|
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) |
142 | 135 |
|
143 |
| - ax3, aux_ax3 = setup_axes3(fig, 133) |
| 136 | +ax3, aux_ax3 = setup_axes3(fig, 133) |
144 | 137 |
|
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) |
148 | 141 |
|
149 |
| - plt.show() |
| 142 | +plt.show() |
0 commit comments