david8373 wrote:
Hi guys,

I'm new to R and this might be a basic question. I want to have a plot with
a table right under it containing all the data in the plot. Is that possible
in R? How do to it?

Hi Yuhan,
Try this:

library(plotrix)
par(mfrow=c(2,1))
x<-rnorm(10)
y<-rnorm(10)
plot(x,y)
plot(0,xlim=c(-1,1),ylim=c(-1,1),type="n",
axes=FALSE,xlab="",ylab="")
addtable2plot(-1,0.3,matrix(round(c(x,y),2),
nrow=2,byrow=TRUE),
display.colnames=FALSE)

Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to