ggplot2 plot without axes, legends, etc

后端 未结 8 1426
执念已碎
执念已碎 2020-11-28 18:23

I want to use bioconductor\'s hexbin (which I can do) to generate a plot that fills the entire (png) display region - no axes, no labels, no background, no nuthin\'.

8条回答
  •  心在旅途
    2020-11-28 18:29

    xy <- data.frame(x=1:10, y=10:1)
    plot <- ggplot(data = xy)+geom_point(aes(x = x, y = y))
    plot
    panel = grid.get("panel-3-3")
    
    grid.newpage()
    pushViewport(viewport(w=1, h=1, name="layout"))
    pushViewport(viewport(w=1, h=1, name="panel-3-3"))
    upViewport(1)
    upViewport(1)
    grid.draw(panel)
    

提交回复
热议问题