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

Function test_cursor_precision

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

Source from the content-addressed store, hash-verified

457
458
459def test_cursor_precision():
460 ax = plt.subplot(projection="polar")
461 # Higher radii correspond to higher theta-precisions.
462 assert ax.format_coord(0, 0.005) == "θ=0.0π (0°), r=0.005"
463 assert ax.format_coord(0, .1) == "θ=0.00π (0°), r=0.100"
464 assert ax.format_coord(0, 1) == "θ=0.000π (0.0°), r=1.000"
465 assert ax.format_coord(1, 0.005) == "θ=0.3π (57°), r=0.005"
466 assert ax.format_coord(1, .1) == "θ=0.32π (57°), r=0.100"
467 assert ax.format_coord(1, 1) == "θ=0.318π (57.3°), r=1.000"
468 assert ax.format_coord(2, 0.005) == "θ=0.6π (115°), r=0.005"
469 assert ax.format_coord(2, .1) == "θ=0.64π (115°), r=0.100"
470 assert ax.format_coord(2, 1) == "θ=0.637π (114.6°), r=1.000"
471
472
473def test_custom_fmt_data():

Callers

nothing calls this directly

Calls 1

format_coordMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…