[R] Unreadable labels -- in x11() and derivative

Martin Maechler maechler at stat.math.ethz.ch
Mon May 22 10:24:14 CEST 2006


>>>>> "Maciej" == Maciej Bliziński <m.blizinski at wit.edu.pl>
>>>>>     on Sun, 21 May 2006 14:48:13 +0200 writes:

    Maciej> Playing around with examples from MASS4, I found a font problem in the
    Maciej> mosaicplot in R-2.3.0. It doesn't happen in other plots. Running this
    Maciej> example from MASS4, page 326...

    Maciej> library(MASS)
    Maciej> caith1 <- as.matrix(caith)
    Maciej> names(dimnames(caith1)) <- c("eyes", "hair")
    Maciej> mosaicplot(caith1, color = TRUE)

    Maciej> ...I get an image as attached. The column and row labels are unreadable.
    Maciej> It is true for both x11() and png() devices.

    .....................

    Maciej> Looking at the demo(graphics), I can also recognize some unreadable
    Maciej> labels. Do you think it's only the matter of the X-Window system?

    Maciej> Installed fonts? 

    Maciej> Any hints appreciated.

Yes, it's a matter of the X - font server of your X-window
system. As  help(png)  clearly notes, png() itself is also using
the x11() internals.

For me, the labels are all well readable for the above example;
even here (at work) where the font server is still not providing
correct font sizes too often for my taste -- e.g. when drawing graphs
with the Rgraphviz package {from bioconductor}.

Martin Maechler, ETH Zurich



More information about the R-help mailing list