相关疑难解决方法(0)

没有轴或网格的ggplot2主题

我试图制作一个没有数据之外的信息的情节.没有轴; 没有网格; 无题; 只是情节.

但我不断获得额外的利润和填充,我无法删除.

library(ggplot2)
library(grid)

theme_bare <- theme(
  axis.line = element_blank(), 
  axis.text.x = element_blank(), 
  axis.text.y = element_blank(),
  axis.ticks = element_blank(), 
  axis.title.x = element_blank(), 
  axis.title.y = element_blank(), 
  #axis.ticks.length = unit(0, "lines"), # Error 
  axis.ticks.margin = unit(c(0,0,0,0), "lines"), 
  legend.position = "none", 
  panel.background = element_rect(fill = "gray"), 
  panel.border = element_blank(), 
  panel.grid.major = element_blank(), 
  panel.grid.minor = element_blank(), 
  panel.margin = unit(c(0,0,0,0), "lines"), 
  plot.background = element_rect(fill = "blue"),
  plot.margin = unit(c(0,0,0,0), "lines")
)

ggplot() + 
  geom_area (data=economics, aes(x = date, y = unemploy), linetype=0) …
Run Code Online (Sandbox Code Playgroud)

r ggplot2

29
推荐指数
3
解决办法
3万
查看次数

标签 统计

ggplot2 ×1

r ×1