Make a 2D legend for a plot - bi-variate choropleth maps

后端 未结 3 2231
情深已故
情深已故 2021-02-10 23:48

I have been playing with bi-variate choropleth maps and have gotten stuck on how to create a 2d legend similar to the one by Joshua Stevens shown here:

To illus

3条回答
  •  鱼传尺愫
    2021-02-11 00:42

    Not a complete answer, but I think you need to play with guides.

    ggplot(legendGoal, 
           aes(Var1,Var2,
               col=as.factor(value),
               fill=as.factor(value))) +
      geom_tile() +
      guides(col = guide_legend(nrow = 3))
    

提交回复
热议问题