【问题标题】:Plot basic graph with no borders, titles, etc绘制没有边框、标题等的基本图形
【发布时间】:2015-06-23 00:57:20
【问题描述】:

我想制作一个占据整个空间的情节;没有边框,没有比例尺等。

我试过了:

sp.predict <- predict(tstack, sp.tree4, 
   n.trees=sp.tree4$gbm.call$best.trees, 
   type = "response")    
plot(sp.predict)

这给了我很好的情节,但有一个边框,标题应该去的空白空间等。我怎样才能让情节占据整个空间?

【问题讨论】:

  • 你能提供一个可重现的例子吗?
  • 这是一个相当大的栅格堆栈,我不知道该怎么做。

标签: r plot raster


【解决方案1】:

使用par(mar=rep(0,4)),如本例所示来自?plot.raster

 require(grDevices)
 r <- as.raster(c(0.5, 1, 0.5))
 ## ... snip
 # fill page
 op <- par(mar=rep(0, 4))
 plot(r, asp=NA)
 par(op)

您可能还想添加legend=FALSE ...

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2022-11-10
  • 1970-01-01
  • 1970-01-01
  • 2017-10-31
  • 1970-01-01
  • 1970-01-01
  • 2015-06-09
  • 1970-01-01
相关资源
最近更新 更多