# Automatic x/y lims cut off markers

**URL:** <https://discourse.julialang.org/t/automatic-x-y-lims-cut-off-markers/116582>\
**Category:** Visualization\
**Tags:** plotting, visualization, makie\
**Created:** [July 3, 2024, 10:11am UTC](https://discourse.julialang.org/t/automatic-x-y-lims-cut-off-markers/116582 "2024-07-03T10:11:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerlich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jerlich/32/5205_2.png) [@jerlich](https://discourse.julialang.org/u/jerlich)\
**Post date:** [July 3, 2024, 10:11am UTC](https://discourse.julialang.org/t/automatic-x-y-lims-cut-off-markers/116582/1 "2024-07-03T10:11:24Z")

</div>

when using large markers, the edge of the marker is outside of the x / y lims.

e.g:

```julia
scatter([1,2,1,2],[1,1,2,2].*0.5; 
   markersize=60, marker='◯', 
   figure=(;size=(200,200)))

```

![Untitled](https://global.discourse-cdn.com/julialang/original/3X/7/0/70cdf9aa3e49d005839afabda45613551ee33b40.png)

Should the auto x/y lims take into account the markersize/shape?

Is there an easy way to extend the lims in a smart way?

---

<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:** [July 3, 2024, 1:11pm UTC](https://discourse.julialang.org/t/automatic-x-y-lims-cut-off-markers/116582/2 "2024-07-03T13:11:36Z")

</div>

You can compute how far you’d have to extend the limits so that the markers would stay away from the edges far enough not to clip. But if they’re too large there will be no solution, or you’ll have to make the limits really huge which is kind of bad for readability

---

<div class="post-metadata">

**Author:** ![jerlich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jerlich/32/5205_2.png) [@jerlich](https://discourse.julialang.org/u/jerlich)\
**Post date:** [July 4, 2024, 8:25am UTC](https://discourse.julialang.org/t/automatic-x-y-lims-cut-off-markers/116582/3 "2024-07-04T08:25:24Z")

</div>

How does the markersize map to the x and y units?

For my case, i realized it was easier to use `arc` since i could know exactly the extent.

---

<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:** [July 4, 2024, 10:33am UTC](https://discourse.julialang.org/t/automatic-x-y-lims-cut-off-markers/116582/4 "2024-07-04T10:33:25Z")

</div>

If you want markers in data space size you can also do that with scatter

> **[scatter | Makie](https://docs.makie.org/stable/reference/plots/scatter#Marker-space)**
>
> Create impressive data visualizations with Makie, the plotting ecosystem for the Julia language. Build aesthetic plots with beautiful customizable themes, control every last detail of publication quality vector graphics, assemble complex layouts and...

Otherwise, you have to relate the axis size to its limits to know how much screen space maps to how much data space
