()
| 457 | |
| 458 | |
| 459 | def 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 | |
| 473 | def test_custom_fmt_data(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…