GGally::ggpairs plot without gridlines when plotting correlation coefficient

前端 未结 1 1756
甜味超标
甜味超标 2020-12-13 05:49

GGally::ggpairs plots nice graphs like following one. Only thing I seek to refine it even more is to remove all gridlines in upper part of plot, where is correl

相关标签:
1条回答
  • 2020-12-13 06:10

    Check out this related question and my forked repo. Use assignInNamespace to modify ggally_cor function as shown in the aforementioned question.

    The only thing that needs to be done is modifying theme call:

      theme(legend.position = "none", 
            panel.grid.major = element_blank(), 
            axis.ticks = element_blank(), 
            panel.border = element_rect(linetype = "dashed", colour = "black", fill = NA))
    

    enter image description here

    0 讨论(0)
提交回复
热议问题