# How to modify the label details from a \`poly\` object (not just the text)

**URL:** https://discourse.julialang.org/t/how-to-modify-the-label-details-from-a-poly-object-not-just-the-text/124609
**Category:** Visualization
**Tags:** makie
**Created:** [January 9, 2025, 8:27pm UTC](https://discourse.julialang.org/t/how-to-modify-the-label-details-from-a-poly-object-not-just-the-text/124609 "2025-01-09T20:27:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![favba](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/favba/32/2735_2.png) [@favba](https://discourse.julialang.org/u/favba)
#### Post date: [January 9, 2025, 8:27pm UTC](https://discourse.julialang.org/t/how-to-modify-the-label-details-from-a-poly-object-not-just-the-text/124609/1 "2025-01-09T20:27:25Z")

</div>

I’m trying to change the figure below to make the red and green squares in the labels box smaller (and, as a side effect, make the label box smaller, such that it doesn’t overlap with the circles).  
How can I achieve that?  
The figure is already at the precise size I want it to be.  
As a workaround I could change the figure size, fonts, and linewidth sizes and rescale back to the size I wanted it to be, but I’d like to know how to properly do it.

 ![20250109_17h12m05s_grim](https://global.discourse-cdn.com/julialang/original/3X/8/c/8c2fe1fe952e400156b254c7c3062600cee84c26.png)

The labels are created simply using the `label` keyword in the `poly!` function.  
The relevant part of the script is:

```julia
...
    plt.poly!(ax,Circle(Point2f(xc, yc), dc), color = (:red,0.5), transparency = true, label="Δ = 2*dc")
    plt.poly!(ax,Circle(Point2f(xc, yc), 2*dc), color = (:green,0.5), transparency = true, label="Δ = 4*dc")
    plt.axislegend(ax)
...

```

Is there a simple setting for that? Or do I need to create a new “Label box” from scratch in order to do that?

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [January 9, 2025, 8:53pm UTC](https://discourse.julialang.org/t/how-to-modify-the-label-details-from-a-poly-object-not-just-the-text/124609/2 "2025-01-09T20:53:40Z")

</div>

The setting is `patchsize` [Legend | Makie](https://docs.makie.org/stable/reference/blocks/legend#patchsize)

There are also settings for the padding of the legend, the distances between labels and patches, etc.

---

<div class="post-metadata">

### Author: ![favba](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/favba/32/2735_2.png) [@favba](https://discourse.julialang.org/u/favba)
#### Post date: [January 9, 2025, 9:04pm UTC](https://discourse.julialang.org/t/how-to-modify-the-label-details-from-a-poly-object-not-just-the-text/124609/3 "2025-01-09T21:04:30Z")

</div>

Thank you, jules!  
I was looking for it in the “Label” entry on the reference page instead of the proper “Legend” entry 😅
