[R] dotplot: character size of labels
Uwe Ligges
ligges at statistik.uni-dortmund.de
Thu Jan 18 10:57:07 CET 2001
RINNER Heinrich wrote:
>
> Dear R users,
>
> using dotplot (R1.2.0, WinNT4.0), I am trying to change the character size
> of the labels of the points:
>
> > # example
> > data(VADeaths)
> > dotplot(VADeaths, main = "Death Rates in Virginia - 1940")
> > # I'd like to have smaller character size of the labels (for age and
> population groups)
> > ?dotplot
> > # for argument "cex", this says: "Setting cex to a value smaller than one
> can be a useful way of avoiding label overlap."
> > dotplot(VADeaths, main = "Death Rates in Virginia - 1940", cex = 0.5)
> > # the main title and the plotting characters are smaller now, but not the
> labels
> > # trying to set other graphics parameters seems to have no effect:
> > dotplot(VADeaths, main = "Death Rates in Virginia - 1940", cex.axis = 0.5)
> > dotplot(VADeaths, main = "Death Rates in Virginia - 1940", cex.lab = 0.5)
>
> I'd be grateful for any hint how to do this correctly;
You have to add "cex = cex" in the mtext() calls in the function
dotplot():
63-64:
for (i in 1:n) mtext(labs[i], side = 2, line = loffset,
at = y[i], adj = 0, col = color, las = 2, cex = cex,...)
73-75:
for (i in 1:nlevels(groups)) mtext(glabels[i], side = 2,
line = goffset, at = gpos[i], adj = 0, col = gcolor,
las = 2, cex = cex, ...)
Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list