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

Function test_axline_small_slope

lib/matplotlib/tests/test_lines.py:404–412  ·  view source on GitHub ↗

Test that small slopes are not coerced to zero in the transform.

()

Source from the content-addressed store, hash-verified

402
403
404def test_axline_small_slope():
405 """Test that small slopes are not coerced to zero in the transform."""
406 line = plt.axline((0, 0), slope=1e-14)
407 p1 = line.get_transform().transform_point((0, 0))
408 p2 = line.get_transform().transform_point((1, 1))
409 # y-values must be slightly different
410 dy = p2[1] - p1[1]
411 assert dy > 0
412 assert dy < 4e-12

Callers

nothing calls this directly

Calls 3

axlineMethod · 0.80
transform_pointMethod · 0.80
get_transformMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…