[R] fontsize in mosaic plot lables

David Meyer david.meyer at wu-wien.ac.at
Mon Sep 24 10:51:26 CEST 2007


Herry,

mosaic() by default uses the labeling_border() workhorse, which gives
you the choice of modifying either gp_labels or gp_varnames. So just
replacing gp_text by gp_labels shoud do the trick.

Best
David

----------


Hi List,

I am trying unsucessfully to modify the fontsize of lables in mosaic:


require(vcd)
mosaic(Titanic, pop=FALSE,
labeling_args=list(rot_labels=c(bottom=90,top=90),
       set_varnames = c(Sex = "Gender"),
           gp_text=gpar(fontsize=20))) #can't get it to resize text

tab <- ifelse(Titanic < 6, NA, Titanic)
# it works for labeling_cells
labeling_cells(text = tab, margin =
0,gp_text=gpar(fontsize=20))(Titanic)

What am I doing wrong?

Thanx
Herry




-- 
Dr. David Meyer
Department of Information Systems and Operations

Vienna University of Economics and Business Administration
Augasse 2-6, A-1090 Wien, Austria, Europe
Tel: +43-1-313 36 4393
Fax: +43-1-313 36 90 4393
HP:  http://wi.wu-wien.ac.at/~meyer/



More information about the R-help mailing list