# How to make scrool zoom in a single axis in Makie

**URL:** <https://discourse.julialang.org/t/how-to-make-scrool-zoom-in-a-single-axis-in-makie/128570>\
**Category:** General Usage\
**Tags:** makie\
**Created:** [April 30, 2025, 12:34pm UTC](https://discourse.julialang.org/t/how-to-make-scrool-zoom-in-a-single-axis-in-makie/128570 "2025-04-30T12:34:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xor0110](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xor0110/32/7926_2.png) [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Post date:** [April 30, 2025, 12:34pm UTC](https://discourse.julialang.org/t/how-to-make-scrool-zoom-in-a-single-axis-in-makie/128570/1 "2025-04-30T12:34:48Z")

</div>

I would like to modify the default behavior in Makie so that scrolling onty changes the vertical axis scale, and shift-scroll changes the horizontal scale. How can I change the behavior of the event based on modifier keys? And how to I reuse the normal zoom functionality? And how do I make this the default behavior in my machine using `setup.jl`?

---

<div class="post-metadata">

**Author:** ![Fliks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fliks/32/2494_2.png) [@Fliks](https://discourse.julialang.org/u/Fliks)\
**Post date:** [April 30, 2025, 1:17pm UTC](https://discourse.julialang.org/t/how-to-make-scrool-zoom-in-a-single-axis-in-makie/128570/2 "2025-04-30T13:17:43Z")

</div>

You can restrict the axis that is zoomed via the xzoomlock and yzoomlock attributes and then set the keys that set the axis that is zoomed via the xzoomkey. See the this section in the docs: [Axis3 | Makie](https://docs.makie.org/stable/reference/blocks/axis3#zoom) for 3D and this for 2D [Axis | Makie](https://docs.makie.org/stable/reference/blocks/axis#Scroll-zoom).

---

<div class="post-metadata">

**Author:** ![xor0110](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xor0110/32/7926_2.png) [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Post date:** [April 30, 2025, 1:23pm UTC](https://discourse.julialang.org/t/how-to-make-scrool-zoom-in-a-single-axis-in-makie/128570/3 "2025-04-30T13:23:22Z")

</div>

First time I came across this, whoa. Mind=blow. Makie is so good. Thanks! 🙂
