# Makie - How to choose alignment of an axis that does not fill its allocated layout

**URL:** https://discourse.julialang.org/t/makie-how-to-choose-alignment-of-an-axis-that-does-not-fill-its-allocated-layout/60725
**Category:** Visualization
**Tags:** makie
**Created:** [May 7, 2021, 3:08pm UTC](https://discourse.julialang.org/t/makie-how-to-choose-alignment-of-an-axis-that-does-not-fill-its-allocated-layout/60725 "2021-05-07T15:08:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Kolaru](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kolaru/32/4574_2.png) [@Kolaru](https://discourse.julialang.org/u/Kolaru)
#### Post date: [May 7, 2021, 3:08pm UTC](https://discourse.julialang.org/t/makie-how-to-choose-alignment-of-an-axis-that-does-not-fill-its-allocated-layout/60725/1 "2021-05-07T15:08:55Z")

</div>

When choosing `DataAspect` for an axis and setting the limits manually, it is not uncommon for an axis to not fill all the space at its disposition. As far as I know this is unavoidable since in this case the aspect ratio of the layout space and of the axis are chosen independently.

However is there a way to align the axis along one of the border, instead of having centered in its allocated space?

For example in the following I would like to have a 0 gap between the rows, by aligning the top axes to the bottom of their allocated boxes and the bottom axes to the top of their. Having a bit of extra space on top and bottom in this case is in this case less of a concern than a gap in between.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/0/20c017b3dd049b3cc5ab6b29f8d29b3e4035ff91.png)

---

<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: [May 7, 2021, 3:46pm UTC](https://discourse.julialang.org/t/makie-how-to-choose-alignment-of-an-axis-that-does-not-fill-its-allocated-layout/60725/2 "2021-05-07T15:46:19Z")

</div>

I have thought about adding an additional parameter to Axis for this, like another align. Just wondering what that should be called

---

<div class="post-metadata">

### Author: ![Kolaru](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kolaru/32/4574_2.png) [@Kolaru](https://discourse.julialang.org/u/Kolaru)
#### Post date: [May 11, 2021, 1:09pm UTC](https://discourse.julialang.org/t/makie-how-to-choose-alignment-of-an-axis-that-does-not-fill-its-allocated-layout/60725/3 "2021-05-11T13:09:46Z")

</div>

Why not reusing `valign` and `halign`? Those keywords already allow to position an axis that doesn’t fill the layout when the width and height are given manually (e.g. for inset), and seems to do nothing otherwise.

---

<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: [May 13, 2021, 3:08pm UTC](https://discourse.julialang.org/t/makie-how-to-choose-alignment-of-an-axis-that-does-not-fill-its-allocated-layout/60725/4 "2021-05-13T15:08:54Z")

</div>

Hm I guess it’s unlikely that those two uses would conflict, I’d have to think about it some more
