Hello there,

  could you please help to modify gpar() properties of a cell inside
tableGrob() output.
  In the following example I want to have different color for one out of 4 cells

require(gridExtra)
z<-matrix(1:4,2,2)
grid.draw(tableGrob(z))

  The only way I found for now how to do it is to do something like this
downViewport(current.vpTree()$children[[1]]$children[[6]]$name)
grid.text('2',gp=gpar(col='red',fontface='bold'))

But for some reasons when I try to print the table into jpeg the last
grid.text() prints desired label text somewhere but not in the place I
want it to be.
Is there another more "smart" way to do it?

Thanks in advance!

Kind regards,
Alex

______________________________________________
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