MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_default_thetalocator

Function test_default_thetalocator

lib/matplotlib/tests/test_polar.py:403–414  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

401
402
403def test_default_thetalocator():
404 # Ideally we would check AAAABBC, but the smallest axes currently puts a
405 # single tick at 150° because MaxNLocator doesn't have a way to accept 15°
406 # while rejecting 150°.
407 fig, axs = plt.subplot_mosaic(
408 "AAAABB.", subplot_kw={"projection": "polar"})
409 for ax in axs.values():
410 ax.set_thetalim(0, np.pi)
411 for ax in axs.values():
412 ticklocs = np.degrees(ax.xaxis.get_majorticklocs()).tolist()
413 assert pytest.approx(90) in ticklocs
414 assert pytest.approx(100) not in ticklocs
415
416
417def test_axvspan():

Callers

nothing calls this directly

Calls 4

subplot_mosaicMethod · 0.80
valuesMethod · 0.80
set_thetalimMethod · 0.80
get_majorticklocsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…