# Two y-axis - Issue with limits

**URL:** <https://discourse.julialang.org/t/two-y-axis-issue-with-limits/116205>\
**Category:** Visualization\
**Tags:** glmakie\
**Created:** [June 25, 2024, 2:06pm UTC](https://discourse.julialang.org/t/two-y-axis-issue-with-limits/116205 "2024-06-25T14:06:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NaSi](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@NaSi](https://discourse.julialang.org/u/NaSi)\
**Post date:** [June 25, 2024, 2:06pm UTC](https://discourse.julialang.org/t/two-y-axis-issue-with-limits/116205/1 "2024-06-25T14:06:33Z")

</div>

Hi 🙂  
I am using GLMakie and I would like to add a second yaxis. I have some troubles for defining the limits of both y-axis. The axis seem dependent (when I fix the limit of ax2, it changes the vizualisation of the data on ax1). Could you help ?

```julia

f = Figure()
ax1 = Axis(f[1, 1], yticklabelcolor = :black)
ax2 = Axis(f[1, 1], yticklabelcolor = :red, yaxisposition = :right)
hidespines!(ax2)
lines!(space_cracking,profile_6h, color = :black)
scatter!(location_peaks,best_w, color = :red)
ylims!(ax1,0,100)
ylims!(ax2,0,1)
f

```

Thanks 🙂  
NaSi

---

<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:** [June 25, 2024, 8:34pm UTC](https://discourse.julialang.org/t/two-y-axis-issue-with-limits/116205/2 "2024-06-25T20:34:30Z")

</div>

You’re only plotting into ax2
