[R] Label margins in multiple perspective plots per page

K. VanKirk kfvankirk at alaska.edu
Thu Dec 8 01:36:47 CET 2011

```Hi folks~

As yet I've been unable to determine how to expand the distance between the
tick marks and tick labels in perspective plots. None of the 'par' setting
appear to be applicable to this (including mfg), and placing multiple plots
per page results in a bit obscurity, with the tick values overlapping either
the tick marks or the axes themselves. The code:

main.grid<-layout(matrix(c(1,2,3,4,5,6,7,8),nr=4),
widths=c(20,20),
heights=c(20,20,20,20))
ticks <- pretty(z)

par(mar=c(2,2,2,2))
z <- TPSSLmc
x <- (1:nrow(z)+1980)
y <- (1:ncol(z))

z0 <- min(z)
z <- rbind(z0, cbind(z0, z, z0), z0)
x <- c(min(x) - 1e-10, x, max(x) + 1e-10)
y <- c(min(y) - 1e-10, y, max(y) + 1e-10)

fill <- matrix("seagreen", nr = nrow(z)-1, nc = ncol(z)-1)
fill[ , i2 <- c(1,ncol(fill))] <- "grey"
fill[i1 <- c(1,nrow(fill)) , ] <- "grey"

fcol <- fill
zi <- TPSSLmc[-1,-1] + TPSSLmc[ -1,-12] +
TPSSLmc[-20,-1] + TPSSLmc[-20,-12]  ## / 4
fcol[-i1,-i2] <-
heat.colors(30)[cut(zi, quantile(zi, seq(0,1, len = 20)),
include.lowest = TRUE)]

persp(x, y, z, theta = 140, phi = 20, col = fcol, scale = FALSE, axes=TRUE,
ylab="Prey_Age",xlab="",zlab="",

nticks=4,ticktype="detailed",expand=17,shade=0.2,cex.axis=1.4,cex.lab=1.5)
title("OPERATING MODEL", font.main=3,cex.main=1.5)

[plot code repeated 7x for 8 plots per page]

dev.off()

Thanks so much!!

K. VanKirk

--
View this message in context: http://r.789695.n4.nabble.com/Label-margins-in-multiple-perspective-plots-per-page-tp4171096p4171096.html
Sent from the R help mailing list archive at Nabble.com.

```

More information about the R-help mailing list