# Plot beyond gridlines

**URL:** <https://discourse.julialang.org/t/plot-beyond-gridlines/67438>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [August 31, 2021, 5:39pm UTC](https://discourse.julialang.org/t/plot-beyond-gridlines/67438 "2021-08-31T17:39:13Z")\
**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:** [August 31, 2021, 5:39pm UTC](https://discourse.julialang.org/t/plot-beyond-gridlines/67438/1 "2021-08-31T17:39:14Z")

</div>

```julia
using WGLMakie

n = 500
x = 1:n
y = randn(n)

fig = Figure()
ax = Axis(
    fig[1,1],
    limits=(nothing, (-1.5, 1.5)),
    xgridcolor=:red,
    leftspinevisible=false,
    rightspinevisible=false,
    topspinevisible=false,
    bottomspinevisible=false,
)
scatter!(x,y)
fig

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/e/1e4c2ae823964513ac5f0a5082044c75c51f88cf.png)

I want to plot points above and below the y-gridlines. That could be implemented in two ways:

1. Extend the plotting space: plot points beyond the `limits` into the marginal space.
2. Shorten the y-grid lines so they only go `(-1.0, 1.0)` instead of the full length of the `limits`, setting `ygridlimits = (-1., 1.)`.

Is either of these possible?

---

<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:** [August 31, 2021, 6:00pm UTC](https://discourse.julialang.org/t/plot-beyond-gridlines/67438/2 "2021-08-31T18:00:49Z")

</div>

Why not increase the limits themselves?

---

<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:** [August 31, 2021, 6:22pm UTC](https://discourse.julialang.org/t/plot-beyond-gridlines/67438/3 "2021-08-31T18:22:43Z")

</div>

If I extend the limits, the y-gridlines will be extended too. I want to have scatter points beyond the vertical range of the red lines. So shortening the lines or plotting beyond the axis limits. The `ygridlimits` I mentioned is fictional; this intent may be too niche to merit support.

---

<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:** [August 31, 2021, 7:42pm UTC](https://discourse.julialang.org/t/plot-beyond-gridlines/67438/4 "2021-08-31T19:42:33Z")

</div>

If it’s important to you that there are red lines ranging across certain values, I would just plot them directly and not work around the intrinsic behavior of grid lines
