row column heatmap plot with overlayed circle (fill and size) in r

后端 未结 1 1504
粉色の甜心
粉色の甜心 2020-12-30 15:21

Here is a graph I am trying to develop:

\"enter

I have row and column coordina

相关标签:
1条回答
  • 2020-12-30 15:59

    Here it is better to use geom_tile (heatmap).

    require(ggplot2)
      ggplot(dataf, aes(y = factor(rowv),
                 x = factor(columnv))) +        ## global aes
      geom_tile(aes(fill = rectheat)) +         ## to get the rect filled
      geom_point(aes(colour = circlefill, 
                       size =circlesize))  +    ## geom_point for circle illusion
      scale_color_gradient(low = "yellow",  
                           high = "red")+       ## color of the corresponding aes
      scale_size(range = c(1, 20))+             ## to tune the size of circles
      theme_bw()
    

    enter image description here

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