plotting pie graphs on map in ggplot

后端 未结 5 1307
情话喂你
情话喂你 2020-11-28 04:12

This may be a wish list thing, not sure (i.e. maybe there would need to be the creation of geom_pie for this to occur). I saw a map today (LINK) with pie graph

5条回答
  •  庸人自扰
    2020-11-28 04:57

    I stumbled upon what looks like a function to do this: "add.pie" in the "mapplots" package.

    The example from the package is below.

    plot(NA,NA, xlim=c(-1,1), ylim=c(-1,1) )
    add.pie(z=rpois(6,10), x=-0.5, y=0.5, radius=0.5)
    add.pie(z=rpois(4,10), x=0.5, y=-0.5, radius=0.3)
    

提交回复
热议问题