Hi, i'm plotting some "bubbles" in a x-y diagram. I like to add a table like: cl80m <- aggregate(cl80,list(Cluster=cl80[,10]),mean) but, put it with: grid.text(as.data.frame(cl80m), x = unit(0.5, "npc"), y = unit(0.5, "npc")) i get it as list and not really to read. Have anybody more experience, add small table's (6-9 rows, 3-8 colums) in a corner of a plot Many thanks for suggestion, christian grid.newpage() vp <- viewport(x=0.5,y=0.5,w=0.6,h=0.6,xscale=c(0.5,4.5),yscale=c(0,15)) push.viewport(vp) grid.rect() grid.points(cl80m[,2],cl80m[,4],size=unit(table(cl80[,10])/450,"inches")) grid.xaxis() grid.yaxis() gp=gpar(fontsize=12,col="blue",lwd=5)) pop.viewport() [[alternative HTML version deleted]]
Hi Christian Schulz wrote:> Hi, > > i'm plotting some "bubbles" in a x-y diagram. > I like to add a table like: > cl80m <- aggregate(cl80,list(Cluster=cl80[,10]),mean) > but, put it with: > grid.text(as.data.frame(cl80m), x = unit(0.5, "npc"), y = unit(0.5, "npc")) > i get it as list and not really to read. > > Have anybody more experience, add small table's > (6-9 rows, 3-8 colums) in a corner of a plotThere's a document discussing ways of creating a table using grid at http://www.stat.auckland.ac.nz/~paul/grid/table.pdf If you could provide me with an example that I could run (i.e., data included or randomly generated) I might be able to make more useful suggestions. Paul -- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 paul at stat.auckland.ac.nz