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 screenshot, which was posted by Tyler Rinker, the author of R package pacman. The question remained unsolved until he discover that ggtree can do it. The ggtree solution is to use the subview function, which is good for embed subplots and can embed different types of plots and even user’s own image files. But it has its own drawback for plotting pies on map. First, it render plots as raster image make it slow to render when we plotting a lot of pies. Second we need some hack to add legend. Thanks to the ggforce package, which provide a native implementation of the pie geom, we can plot pies on cartesian coordination. I created a wrapper function to make it more easy to plot a set of pies. For example, suppose we have the following data: set.seed(123) long