Plot basic graph with no borders, titles, etc

60 views Asked by At

I want to make a plot which takes up the entire space; no borders, no scale bars, etc.

I tried:

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

Which gives me the plot fine but has a border, blank space where the titles should go, etc. How can I get the plot to take up the entire space?

1

There are 1 answers

6
Ben Bolker On

Use par(mar=rep(0,4)), as shown in this example from ?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)

You may also want to add legend=FALSE ...

enter image description here