# Mosaic plot in Makie

**URL:** <https://discourse.julialang.org/t/mosaic-plot-in-makie/89425>\
**Category:** General Usage\
**Tags:** makie\
**Created:** [October 28, 2022, 5:06am UTC](https://discourse.julialang.org/t/mosaic-plot-in-makie/89425 "2022-10-28T05:06:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [October 28, 2022, 5:06am UTC](https://discourse.julialang.org/t/mosaic-plot-in-makie/89425/1 "2022-10-28T05:06:43Z")

</div>

Does Makie have Mosaic plots?

![image](https://global.discourse-cdn.com/julialang/original/3X/a/8/a89dfa71b252e0ab7b7931e3d75300231c238c45.png)

> **[Mosaic plot](https://en.wikipedia.org/wiki/Mosaic_plot)**
>
> A mosaic plot, Marimekko chart, Mekko chart, or sometimes percent stacked bar plot is a graphical visualization of data from two or more qualitative variables. It is the multidimensional extension of spineplots, which graphically display the same information for only one variable. It gives an overview of the data and makes it possible to recognize relationships between different variables. For example, independence is shown when the boxes across categories all have the same areas. Mosai As with ...

> <https://github.com/haleyjeppson/ggmosaic/blob/master/README.md>

---

<div class="post-metadata">

**Author:** ![hexaeder](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hexaeder/32/24403_2.png) [@hexaeder](https://discourse.julialang.org/u/hexaeder)\
**Post date:** [October 28, 2022, 5:15am UTC](https://discourse.julialang.org/t/mosaic-plot-in-makie/89425/2 "2022-10-28T05:15:14Z")

</div>

Looks like a stacked barplot where the sum in each column is always the same?

[https://docs.makie.org/stable/examples/plotting\_functions/barplot/#example\_18247593978837929480](https://docs.makie.org/stable/examples/plotting_functions/barplot/#example_18247593978837929480)

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [October 28, 2022, 5:16am UTC](https://discourse.julialang.org/t/mosaic-plot-in-makie/89425/3 "2022-10-28T05:16:59Z")

</div>

Kinda, but the vertical-axis labels (text and position) are wrong there.

---

<div class="post-metadata">

**Author:** ![hexaeder](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hexaeder/32/24403_2.png) [@hexaeder](https://discourse.julialang.org/u/hexaeder)\
**Post date:** [October 28, 2022, 5:25am UTC](https://discourse.julialang.org/t/mosaic-plot-in-makie/89425/4 "2022-10-28T05:25:03Z")

</div>

Sure, but you can always place whatever you want wherever you want using the `xticks` and `yticks` argument. Here is an example which replaces the `xtick` labels in a barplot: [Axis](https://docs.makie.org/stable/examples/blocks/axis/#pseudolog_and_symlog_scales)

Whats really missing are the gaps between the stacks, that might be more complicated.
