[R] control of font size & colour for title, subtitles, axis, and tick marks in LATTICE graph

Jens Hainmueller jens_hainmueller at ksg05.harvard.edu
Wed Sep 15 15:24:53 CEST 2004


Hi,

I very much appreciate any help on this "fine tuning" problem in a lattice
graph (I am new to LATTICE and could not find an example in the help files
that worked for me. My apologies if I missed it there).

I am running the following box plots to compare conditional distributions of
x at different levels of y under two treatment conditions ID=1 (upper
panel ) & ID=0 (lower panel of the plot).

bwplot(HF.ELECYEAR ~ stparvotech | ID ,
	data=data, aspect=1,
	layout=c(1,2),
            xlab="Changes in Party Vote Shares",
	xlim=(-20:20),
            ylab="Periods Following Last Federal Election",
            main="Divided Government",
	panel = function(x,y)
		{
		panel.bwplot(x,y)
		panel.abline(v=0, col="red")
		}
	)

How can I:
1. Control the font size of the main title, the panel titles, the axis, and
the tick marks? The usual cex.main=1/3, cex.xlab etc. do not work.
2. Change the color of the boxes where the panel titles (ID=1 & ID=0) are
located?

Thank you very much.

Best,
Jens




More information about the R-help mailing list