[R] graph help

Jim Lemon jim at bitwrit.com.au
Sun Jan 31 10:27:32 CET 2010


On 01/31/2010 07:04 AM, Rob Manley wrote:
> Hello,
>
> I'm fairly new to R and having trouble displaying my data graphically to a
> publishable quality.
> I have a multivariate data-set (columns all the same length), 8
> environmental variables and 3 species diversity variables.
> I'm simply trying to display bivariate plots of the environmental variables
> against the species diversity variables (response variables).
> As there will be many graphs, I think it best to do it as par(mfrow =
> c(3,4)) - twice over. The way I'm doing it at the moment looks a bit messy.
> How do you reduce the space between graphs,

# this is a bit extreme
par(mar=c(0,0,0,0))

  delete the values that are
> automatically put on the axes,

plot(...,xlab="",ylab="",axes=FALSE,...)

  and put text on the graph (e.g. R and p
> values).

# someR and somep may be something like t.test(...)$p.value
Rp<-paste(paste("R =",someR),paste("p =",somep),sep="\n")
# x and y are where you want the text on the current plot
text(x,y,Rp)

Jim



More information about the R-help mailing list