()
| 234 | |
| 235 | @image_comparison(['polar_theta_wedge.png'], style='default') |
| 236 | def test_polar_theta_limits(): |
| 237 | r = np.arange(0, 3.0, 0.01) |
| 238 | theta = 2*np.pi*r |
| 239 | |
| 240 | theta_mins = np.arange(15.0, 361.0, 90.0) |
| 241 | theta_maxs = np.arange(50.0, 361.0, 90.0) |
| 242 | DIRECTIONS = ('out', 'in', 'inout') |
| 243 | |
| 244 | fig, axs = plt.subplots(len(theta_mins), len(theta_maxs), |
| 245 | subplot_kw={'polar': True}, |
| 246 | figsize=(8, 6)) |
| 247 | |
| 248 | for i, start in enumerate(theta_mins): |
| 249 | for j, end in enumerate(theta_maxs): |
| 250 | ax = axs[i, j] |
| 251 | ax.plot(theta, r) |
| 252 | if start < end: |
| 253 | ax.set_thetamin(start) |
| 254 | ax.set_thetamax(end) |
| 255 | else: |
| 256 | # Plot with clockwise orientation instead. |
| 257 | ax.set_thetamin(end) |
| 258 | ax.set_thetamax(start) |
| 259 | ax.set_theta_direction('clockwise') |
| 260 | ax.tick_params(tick1On=True, tick2On=True, |
| 261 | direction=DIRECTIONS[i % len(DIRECTIONS)], |
| 262 | rotation='auto') |
| 263 | ax.yaxis.set_tick_params(label2On=True, rotation='auto') |
| 264 | ax.xaxis.get_major_locator().base.set_params( # backcompat |
| 265 | steps=[1, 2, 2.5, 5, 10]) |
| 266 | |
| 267 | |
| 268 | @check_figures_equal() |
nothing calls this directly
no test coverage detected
searching dependent graphs…