Bug 14537 - y alignment of margin plotmath vs ordinary text
Summary: y alignment of margin plotmath vs ordinary text
Alias: None
Product: R
Classification: Unclassified
Component: Graphics (show other bugs)
Version: R-devel (trunk)
Hardware: All All
: P5 trivial
Assignee: R-core
Depends on:
Reported: 2011-03-21 21:29 UTC by Philip Johnson
Modified: 2011-03-25 21:04 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Philip Johnson 2011-03-21 21:29:29 UTC
The y-alignment of plotmath is different than ordinary text:
     mtext("blah", adj=0.2, line=0, side=1)
     mtext(expression(alpha), adj=0.5, line=0, side=1)
are shifted vertically relative to each other.  This also means that inter-line spacing is wonky if one line contains ordinary text and another plotmath.

"Fixing" this behavior requires only minor changes to the code (see bug # 14532; Brian Ripley responded to that bug and pointed out that any change to visual placement should be carefully considered under a separate report).
Comment 1 Brian Ripley 2011-03-24 10:52:13 UTC
This is in part by design: plotmath places enclosing boxes, ordinary text uses a baseline.  You should not be mixing them.

But the match is closed in the trunk.
Comment 2 Philip Johnson 2011-03-25 21:04:02 UTC
Ah, I see.  Not the design that I would have chosen, but I can see arguments for it.  Thank you for explaining.