Hi,
I see, thanks. I incorrectly thought it used to produce the same
output in the past.
As a workaround I will wrap all strings in expression() before
evaluating the grobHeight; otherwise the calculated layout can clip
portions of the text.
Thanks,
baptiste
On 2 May 2011 15:00, Paul Murrell w
Hi
This is a basic "feature" of both strheight() and stringHeight(). They
both ignore any descenders in the text. I cannot remember why it was
done this way originally. The future solution is probably to add an
argument that allows descenders to be included in text height.
Plotmath works
On 27 April 2011 11:06, baptiste auguie wrote:
> Dear all,
>
> I'm puzzled by the behavior of stringHeight in the grid package.
> Consider the following test,
>
> library(grid)
>
> test <- function(lab="dog", ...){
> g1 <- textGrob(lab)
> g2 <- rectGrob(height=grobHeight(g1), width=grobWidth(g1)
Dear all,
I'm puzzled by the behavior of stringHeight in the grid package.
Consider the following test,
library(grid)
test <- function(lab="dog", ...){
g1 <- textGrob(lab)
g2 <- rectGrob(height=grobHeight(g1), width=grobWidth(g1))
gg <- gTree(children=gList(g1,g2), ...)
print(c("height: