yampex.annotate.RectangleRegion(object)
class documentation
Part of yampex.annotate
(View In Hierarchy)
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 |
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).