# Fix \`ylims!\` so zooming affects only \`xlims!\` (Makie.jl 2D)

**URL:** <https://discourse.julialang.org/t/fix-ylims-so-zooming-affects-only-xlims-makie-jl-2d/103226>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [August 26, 2023, 4:45pm UTC](https://discourse.julialang.org/t/fix-ylims-so-zooming-affects-only-xlims-makie-jl-2d/103226 "2023-08-26T16:45:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mschauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mschauer/32/13946_2.png) [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Post date:** [August 26, 2023, 4:45pm UTC](https://discourse.julialang.org/t/fix-ylims-so-zooming-affects-only-xlims-makie-jl-2d/103226/1 "2023-08-26T16:45:59Z")

</div>

How can fix `ylims!` so zooming affects only `xlims!` in Makie 2D? Or alternatively zoom only horizontally? I have a very long trace plot, where this would come in handy.

---

<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 26, 2023, 6:42pm UTC](https://discourse.julialang.org/t/fix-ylims-so-zooming-affects-only-xlims-makie-jl-2d/103226/2 "2023-08-26T18:42:23Z")

</div>

There’s `ax.yzoomlock` or you can hold `x` while zooming
