# Makie.jl x and y axis through origin (0, 0)

**URL:** <https://discourse.julialang.org/t/makie-jl-x-and-y-axis-through-origin-0-0/69683>\
**Category:** Tooling\
**Tags:** makie\
**Created:** [October 13, 2021, 12:24pm UTC](https://discourse.julialang.org/t/makie-jl-x-and-y-axis-through-origin-0-0/69683 "2021-10-13T12:24:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [October 13, 2021, 12:24pm UTC](https://discourse.julialang.org/t/makie-jl-x-and-y-axis-through-origin-0-0/69683/1 "2021-10-13T12:24:55Z")

</div>

I want to create plots with Makie that have the frame going through the origin. Examples are seen in [https://docs.juliaplots.org/latest/generated/plotlyjs/#plotlyjs-ref34](https://docs.juliaplots.org/latest/generated/plotlyjs/#plotlyjs-ref34) docs, which directs you to

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

I am looking from `:origin` or `:zerolines`. Is this possible in Makie currently?

---

<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:** [October 13, 2021, 12:37pm UTC](https://discourse.julialang.org/t/makie-jl-x-and-y-axis-through-origin-0-0/69683/2 "2021-10-13T12:37:26Z")

</div>

Not as an option of the axis, currently. But you can do

```julia
f, ax, s = scatter(randn(200, 2))
vlines!(ax, 0, color = :black)
hlines!(ax, 0, color = :black)
hidespines!(ax)
f

```

 ![grafik](https://global.discourse-cdn.com/julialang/original/3X/8/6/8619070e9a4929d893483f3953bfd0ec735b8cfc.png)

---

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [October 13, 2021, 1:57pm UTC](https://discourse.julialang.org/t/makie-jl-x-and-y-axis-through-origin-0-0/69683/3 "2021-10-13T13:57:22Z")

</div>

Nice! Good quick workaround.

Still missing ticks, tick values etc. But good workaround.

I really find this possibility essential when looking at something that is oscillation near 0, so my personal opinion is that it is something that should be implemented. Easy to say when I don’t plan on doing it myself of course, but my opinion nontheless.

---

<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:** [October 13, 2021, 2:23pm UTC](https://discourse.julialang.org/t/makie-jl-x-and-y-axis-through-origin-0-0/69683/4 "2021-10-13T14:23:03Z")

</div>

Your examples didn’t have the ticks inside, you can do that as well by adding LineAxis explicitly, but maybe it can be added as an option to Axis as well. I’ll think about it

---

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [October 13, 2021, 2:30pm UTC](https://discourse.julialang.org/t/makie-jl-x-and-y-axis-through-origin-0-0/69683/5 "2021-10-13T14:30:16Z")

</div>

You are right, my bad.

Thank you so much for you time, and your efforts on Makie!
