# Bounding box of object in Makie

**URL:** <https://discourse.julialang.org/t/bounding-box-of-object-in-makie/64733>\
**Category:** General Usage\
**Tags:** makie\
**Created:** [July 16, 2021, 7:26am UTC](https://discourse.julialang.org/t/bounding-box-of-object-in-makie/64733 "2021-07-16T07:26:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [July 16, 2021, 7:26am UTC](https://discourse.julialang.org/t/bounding-box-of-object-in-makie/64733/1 "2021-07-16T07:26:12Z")

</div>

Given a `Circle(Point(1,2), 3)`, is it possible to calculate the bounding box of it?

---

<div class="post-metadata">

**Author:** ![ffreyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffreyer/32/21569_2.png) [@ffreyer](https://discourse.julialang.org/u/ffreyer)\
**Post date:** [July 16, 2021, 2:19pm UTC](https://discourse.julialang.org/t/bounding-box-of-object-in-makie/64733/2 "2021-07-16T14:19:58Z")

</div>

You can get bounding boxes for plot objects via `boundingbox(p)`. GeometryBasics also implements some bounding boxes as `Rect(primitive)`

---

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [July 16, 2021, 6:19pm UTC](https://discourse.julialang.org/t/bounding-box-of-object-in-makie/64733/3 "2021-07-16T18:19:13Z")

</div>

I don’t understand what `Rect` is doing.

```julia

julia> Rect(Circle(Point((0.,0.)), 1.))
Rect2D{Float64}([-1.0, -1.0], [2.0, 2.0])

```

---

<div class="post-metadata">

**Author:** ![ffreyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffreyer/32/21569_2.png) [@ffreyer](https://discourse.julialang.org/u/ffreyer)\
**Post date:** [August 2, 2021, 1:31pm UTC](https://discourse.julialang.org/t/bounding-box-of-object-in-makie/64733/4 "2021-08-02T13:31:16Z")

</div>

Oh I didn’t notice you responded. The circle is centered at (0, 0) with radius 1. The Rect contains one corner (-1, -1) and the width (2, 2). There are a bunch of functions like minimum, maximum, widths, origin, etc to get specific things from a `Rect`.
