Re: [R] textbox in lattice

2010-06-08 Thread Paul Murrell
Shifting this to r-devel ... On 6/6/2010 11:20 PM, baptiste auguie wrote: Hi, I've just added width/heightDetails methods following Paul's suggestion. I kept a duplicate of all on-the-fly grob size calculations; it is necessary to ensure that the table cells adjust to the content which can be

Re: [R] textbox in lattice

2010-06-06 Thread baptiste auguie
Hi, I've just added width/heightDetails methods following Paul's suggestion. I kept a duplicate of all on-the-fly grob size calculations; it is necessary to ensure that the table cells adjust to the content which can be subsequently edited (e.g changing the colnames to plotmath expressions). Drawi

Re: [R] textbox in lattice

2010-06-02 Thread baptiste auguie
Hi, On 3 June 2010 05:26, Paul Murrell wrote: > Or the same drawing calculations have to be repeated within > width/heightDetails - those methods should get run within the same graphical > context as the drawDetails method. > Yes, the idea crossed my mind, but I did not find it very appealing (

Re: [R] textbox in lattice

2010-06-02 Thread Paul Murrell
Hi On 2/06/2010 7:33 p.m., baptiste auguie wrote: On 2 June 2010 07:55, Deepayan Sarkar wrote: Something like this should also work, except that the grob produced by tableGrob() doesn't seem to know its height. Indeed, I have not been successful in writing good widthDetails/heightDetails m

Re: [R] textbox in lattice

2010-06-02 Thread baptiste auguie
On 2 June 2010 07:55, Deepayan Sarkar wrote: > > > Something like this should also work, except that the grob produced by > tableGrob() doesn't seem to know its height. Indeed, I have not been successful in writing good widthDetails/heightDetails methods for this grob since all the drawing calcul

Re: [R] textbox in lattice

2010-06-01 Thread Deepayan Sarkar
On Wed, Jun 2, 2010 at 12:37 AM, baptiste auguie wrote: > Please do read the posting guide, in particular regarding reproducible > examples. > > You can use a Grid layout to place the lattice plot and a table in the > same page. For example, > > library(lattice) >  library(coda) >  library(gridEx

Re: [R] textbox in lattice

2010-06-01 Thread Erik Iverson
Noah Silverman wrote: That's amazing. (It would have taken me many hours to figure this out on my own.) Two quick last questions and then I'm off to plotting: 1) How can I reduce the font size of the table. (It is huge on my plot.) 2) How can I control the ratio of "plot area" to "table area"

Re: [R] textbox in lattice

2010-06-01 Thread baptiste auguie
On 1 June 2010 21:12, Noah Silverman wrote: > That's amazing.  (It would have taken me many hours to figure this out > on my own.) > > Two quick last questions and then I'm off to plotting: > 1) How can I reduce the font size of the table. (It is huge on my plot.) try this, grid.table(head(iris)

Re: [R] textbox in lattice

2010-06-01 Thread Noah Silverman
That's amazing. (It would have taken me many hours to figure this out on my own.) Two quick last questions and then I'm off to plotting: 1) How can I reduce the font size of the table. (It is huge on my plot.) 2) How can I control the ratio of "plot area" to "table area" in the grid? Thanks a mi

Re: [R] textbox in lattice

2010-06-01 Thread baptiste auguie
Please do read the posting guide, in particular regarding reproducible examples. You can use a Grid layout to place the lattice plot and a table in the same page. For example, library(lattice) library(coda) library(gridExtra) x <- matrix(runif(2200),ncol=22) m <- as.mcmc(x) p = xyplot(m

Re: [R] textbox in lattice

2010-06-01 Thread Noah Silverman
Hi, It is a matrix. Exactly the output of summary(foo) Would you call the gridExtra command before the xyplot command or after? Now I have: temp <- as.mcmc(foo) xyplot(temp, layout=c(2,11), main="plot title") THANKS!! On 6/1/10 11:35 AM, baptiste auguie wrote: > Hi, > > It's not clear what

Re: [R] textbox in lattice

2010-06-01 Thread baptiste auguie
Hi, It's not clear what you mean by summary text without a minimal reproducible example. If your text is ordered as a matrix or a data.frame, you might want to try this grid function, gridExtra::grid.table(as.matrix(summary(iris)), theme=theme.white()) If your text has the form of a paragraph, t

[R] textbox in lattice

2010-06-01 Thread Noah Silverman
Hi, I want to add a box at the bottom of a lattice window (device/page?). Lattice has drawn a nice group of panels with all the plots I need. How do I add my own summary text at the bottom (several lines worth?) __ R-help@r-project.org mailing list ht