[R] lattice::xyplot axis padding with fontfamily="mono"
btyner at gmail.com
Fri May 29 03:06:07 CEST 2009
Many thanks for the quick response and suggested workaround.
Deepayan Sarkar wrote:
> On Wed, May 27, 2009 at 4:38 PM, Benjamin Tyner <btyner at gmail.com> wrote:
>> Say I have a predictor taking a very wide value:
>> Data <- data.frame(pred="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",resp=1)
>> print(xyplot(pred~resp, data=Data)) # enough y-axis padding to accommodate
>> the wide label
>> print(xyplot(pred~resp, data=Data,scales=list(fontfamily="mono"))) # not
>> enough padding
> It's a bug in the layout calculations (fontfamily is not used).
>> What's the recommended way to have enough padding allocated?
> Ideally by fixing the bug, but that may not be easy to fix in the
> short run. For one-off examples, you could increase the width
> xyplot(pred~resp, data=Data,scales=list(fontfamily="mono"),
> par.settings = list(layout.widths = list(axis.left = 1.1)))
More information about the R-help