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.
Methods
bottom
()Return the y-coordinate of the bottom of the rectangle.
centroid
()Return the centroid of the rectangle.
lbrt
()Return (left,bottom,right,top) as a tuple.
left
()Return the x-coordinate of the left side of the rectangle.
right
()Return the x-coordinate of the right side of the rectangle.
top
()Return the y-coordinate of the top of the rectangle.
empty
height
intersect
width
Examples
>>> aar = AARectangle( (x1,y1),(x2,y2), ... , (xN,yN) )
- 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).
Methods
contains
(x, y)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)Return True if the given point is contained within the bounding box, where the bottom and right boundaries are considered exclusive.
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.
Returns true if the given BoundingBox x is contained within the bounding box, including cases of exact match.
lbrt
()Return left,bottom,right,top values for the BoundingBox.
upperexclusive_contains
(x, y)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.
aarect
script_repr
- 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.
- class holoviews.core.boundingregion.BoundingEllipse(**args)[source]#
Bases:
BoundingBox
Similar to BoundingBox, but the region is the ellipse inscribed within the rectangle.
Methods
contains
(x, y)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.
Methods
centroid
()Return the coordinates of the center of this BoundingBox
aarect
contains
rotate
scale
set
translate