# \`ylabel\` and \`xlabel\` next to axes in facet plot

**URL:** <https://discourse.julialang.org/t/ylabel-and-xlabel-next-to-axes-in-facet-plot/86002>\
**Category:** General Usage\
**Tags:** plotting, makie, makielayout\
**Created:** [August 19, 2022, 12:41pm UTC](https://discourse.julialang.org/t/ylabel-and-xlabel-next-to-axes-in-facet-plot/86002 "2022-08-19T12:41:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rikh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rikh/32/204104_2.png) [@rikh](https://discourse.julialang.org/u/rikh)\
**Post date:** [August 19, 2022, 12:42pm UTC](https://discourse.julialang.org/t/ylabel-and-xlabel-next-to-axes-in-facet-plot/86002/1 "2022-08-19T12:42:00Z")

</div>

Is there a way in `Makie.jl` to “combine” the `xlabel` and `ylabel` by putting them in the middle of the axes? This would be useful for facet plots. For example, I have the following plot

 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/3/5352c1512b839db3c6c13da22fd587edbf64b189.png)

and I would like to avoid the duplication of “True positive rate” and “False positive rate” by placing them in the middle. ggplot2’s facet wrap does this. For example:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/5/4588d6ef4189913d7f4cb7bf9442ba73939621ad.png)

(source: R-bloggers.)

---

<div class="post-metadata">

**Author:** ![SteffenPL](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steffenpl/32/206270_2.png) [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Post date:** [August 19, 2022, 1:15pm UTC](https://discourse.julialang.org/t/ylabel-and-xlabel-next-to-axes-in-facet-plot/86002/2 "2022-08-19T13:15:43Z")

</div>

You could use empy `xlabel, ylabel` and instead have two manually placed `Label`s  
a bit like here:  
[https://makie.juliaplots.org/stable/examples/blocks/label/](https://makie.juliaplots.org/stable/examples/blocks/label/)

---

<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 19, 2022, 2:14pm UTC](https://discourse.julialang.org/t/ylabel-and-xlabel-next-to-axes-in-facet-plot/86002/3 "2022-08-19T14:14:19Z")

</div>

If you are making a standalone plot you can do it like @SteffenPL said and place a label across a column before, and a row after the other content. This will just not allow further alignment with other plots. For that there’s another trick where you place the label in the left or bottom protrusion and pad it with a value derived from all adjacent axis protrusions. That’s how I did it for AlgebraOfGraphics for example.
