I am a rectangular plot region where an annotation or textbox is or might go.

Construct me with the Axes object ax for the annotation or textbox, along with its center position xy, width, and height. For an annotation, also include the number of pixels to the right dx and up dy from that annotation's data-point location to the center of the proposed location.

For an annotation, the positioning of the region is like so, with "A" being the annotation's data-point location, "C" being the center of my rectangular region:

                 |
                 |         +------------------+ y1   ^
                 |         |                  |      :
                 ^ ....... |....... C         |   height
                 :         |        .         |      :
                 :         +------------------+ y0   V
                 dy       x0        .         x1
                 :         <=== width ========>
                 :                  .
                 V                  .
   --------------A<=== dx ==========>------------------------------------
                 |
                 |
Class Variable margin The number of pixels of whitespace to maintain outside the annotations' visible borders.
Method __init__ Undocumented
Method __repr__ Undocumented
Method arrow_line Property: A 2-tuple with endpoints of the annotation's arrow line from its data point (Ax, Ay) to my center (Cx, Cy).
Method overlaps_point Returns True if I overlap the point specified in pixels.
Method overlaps_other Returns True if I overlap the other RectangleRegion instance.
Method overlaps_line Returns True if I overlap the line segment from xya (xa,ya) to xyb (xb,yb).
Method overlaps_obj Returns True if I overlap the supplied Matplotlib obj having a get_window_extent method.
Method _xOverlap Undocumented
Method _yOverlap Undocumented
margin =
The number of pixels of whitespace to maintain outside the annotations' visible borders.
def __init__(self, ax, xy, width, height, dx, dy):
Undocumented
def __repr__(self):
Undocumented
@property
def arrow_line(self):

Property: A 2-tuple with endpoints of the annotation's arrow line from its data point (Ax, Ay) to my center (Cx, Cy).

def overlaps_point(self, x, y):

Returns True if I overlap the point specified in pixels.

def _xOverlap(self, other):
Undocumented
def _yOverlap(self, other):
Undocumented
def overlaps_other(self, other):

Returns True if I overlap the other RectangleRegion instance.

def overlaps_line(self, xya, xyb):

Returns True if I overlap the line segment from xya (xa,ya) to xyb (xb,yb).

def overlaps_obj(self, obj):

Returns True if I overlap the supplied Matplotlib obj having a get_window_extent method.

If there is not yet a renderer, the overlap cannot be determined and so False is returned.

API Documentation for yampex, generated by pydoctor at 2022-11-21 15:03:54.