holoviews.core.boundingregion module
Bounding regions and bounding boxes.
File originally part of the Topographica project.
class holoviews.core.boundingregion. AARectangle ( * points ) [source]
Bases: object
Axis-aligned rectangle class.
Defines the smallest axis-aligned rectangle that encloses a set of
points.
Example
>>> aar = AARectangle ( ( x1 , y1 ),( x2 , y2 ), ... , ( xN , yN ) )
Copy to clipboard
bottom ( ) [source]
Return the y-coordinate of the bottom of the rectangle.
centroid ( ) [source]
Return the centroid of the rectangle.
lbrt ( ) [source]
Return (left,bottom,right,top) as a tuple.
left ( ) [source]
Return the x-coordinate of the left side of the rectangle.
right ( ) [source]
Return the x-coordinate of the right side of the rectangle.
top ( ) [source]
Return the y-coordinate of the top of the rectangle.
class holoviews.core.boundingregion. BoundingBox ( ** args ) [source]
Bases: BoundingRegion
A rectangular bounding box defined either by two points forming
an axis-aligned rectangle (or simply a radius for a square).
contains ( x , y ) [source]
Returns true if the given point is contained within the
bounding box, where all boundaries of the box are
considered to be inclusive.
contains_exclusive ( x , y ) [source]
Return True if the given point is contained within the
bounding box, where the bottom and right boundaries are
considered exclusive.
containsbb_exclusive ( x ) [source]
Returns true if the given BoundingBox x is contained within the
bounding box, where at least one of the boundaries of the box has
to be exclusive.
containsbb_inclusive ( x ) [source]
Returns true if the given BoundingBox x is contained within the
bounding box, including cases of exact match.
lbrt ( ) [source]
Return left,bottom,right,top values for the BoundingBox.
upperexclusive_contains ( x , y ) [source]
Returns true if the given point is contained within the
bounding box, where the right and upper boundaries
are exclusive, and the left and lower boundaries are
inclusive. Useful for tiling a plane into non-overlapping
regions.
class holoviews.core.boundingregion. BoundingEllipse ( ** args ) [source]
Bases: BoundingBox
Similar to BoundingBox, but the region is the ellipse
inscribed within the rectangle.
contains ( x , y ) [source]
Returns true if the given point is contained within the
bounding box, where all boundaries of the box are
considered to be inclusive.
class holoviews.core.boundingregion. BoundingRegion [source]
Bases: object
Abstract bounding region class, for any portion of a 2D plane.
Only subclasses can be instantiated directly.
centroid ( ) [source]
Return the coordinates of the center of this BoundingBox