class of particular rectangle in the context of pyplot. For the need of our problematic which Is To avoid texts annotation overlayering.
a TextRectngle Is just a rectangle With a state. A state Is a given position compared To the point at wich the rectangle (i.e the text in pyplot) Is attached.
We consider 4 possible state. The first state Is the Default state which Is the text positionned at the top-right of the attached point. Second state the text Is at the top left, In the third state it's at the right bottom And at the fourth state it's at the left bottom.
Given this, estimate the length Is important To avoid an important shift For the second And fourth states.