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

Function test_clipping_of_log

lib/matplotlib/tests/test_transforms.py:565–576  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

563
564
565def test_clipping_of_log():
566 # issue 804
567 path = Path._create_closed([(0.2, -99), (0.4, -99), (0.4, 20), (0.2, 20)])
568 # something like this happens in plotting logarithmic histograms
569 trans = mtransforms.BlendedGenericTransform(
570 mtransforms.Affine2D(), scale.LogTransform(10, 'clip'))
571 tpath = trans.transform_path_non_affine(path)
572 result = tpath.iter_segments(trans.get_affine(),
573 clip=(0, 0, 100, 100),
574 simplify=False)
575 tpoints, tcodes = zip(*result)
576 assert_allclose(tcodes, path.codes[:-1]) # No longer closed.
577
578
579class NonAffineForTest(mtransforms.Transform):

Callers

nothing calls this directly

Calls 4

get_affineMethod · 0.95
_create_closedMethod · 0.80
iter_segmentsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…