# Overlay Pie chart and scatter plot with CairoMakie

**URL:** <https://discourse.julialang.org/t/overlay-pie-chart-and-scatter-plot-with-cairomakie/88982>\
**Category:** General Usage\
**Tags:** question\
**Created:** [October 19, 2022, 8:12pm UTC](https://discourse.julialang.org/t/overlay-pie-chart-and-scatter-plot-with-cairomakie/88982 "2022-10-19T20:12:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JJ\_DY](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jj_dy/32/43706_2.png) [@JJ\_DY](https://discourse.julialang.org/u/JJ_DY)\
**Post date:** [October 19, 2022, 8:12pm UTC](https://discourse.julialang.org/t/overlay-pie-chart-and-scatter-plot-with-cairomakie/88982/1 "2022-10-19T20:12:37Z")

</div>

Hi Julia community, Do you know if there is a way to put multiple pie charts on an existing scatter plot based on the x y position?  
I am trying to create a figure like this with Makie but can’t get it to work.

> **[scatterpie for plotting pies on ggplot](https://guangchuangyu.github.io/2016/12/scatterpie-for-plotting-pies-on-ggplot/)**
>
> Plotting pies on ggplot/ggmap is not an easy task, as ggplot2 doesn’t provide native pie geom. The pie we produced in ggplot2 is actually a barplot transform to polar coordination. This make it difficult if we want to produce a map like the above...

Thank very much in advance!

---

<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:** [October 20, 2022, 5:45am UTC](https://discourse.julialang.org/t/overlay-pie-chart-and-scatter-plot-with-cairomakie/88982/2 "2022-10-20T05:45:55Z")

</div>

I just quickly checked the docs and it seemed `pie` is always centered at 0, 0 by default and there’s no attribute to change it. But you should be able to call `Makie.translate!(pieobject, x, y, 0)` to translate each pie to where you need it.

---

<div class="post-metadata">

**Author:** ![JJ\_DY](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jj_dy/32/43706_2.png) [@JJ\_DY](https://discourse.julialang.org/u/JJ_DY)\
**Post date:** [October 26, 2022, 3:20pm UTC](https://discourse.julialang.org/t/overlay-pie-chart-and-scatter-plot-with-cairomakie/88982/3 "2022-10-26T15:20:17Z")

</div>

Great! Thanks, I will give it a try!
