Hi R-ers: I asked a question about how to control the axes on boxplot. Here is what worked:
namz <- c( "R=1/Q1" , "R=0/Q1" , "R=1/Q2" , "R=0/Q2" , "R=1/Q3" , "R=0/Q3" , "R=1/Q4" , "R=0/Q4" ) boxplot( p.prop ~ R + bins , boxwex= .5 , plot = TRUE , axes = FALSE ) axis( side = 1 , at=c(1:8) , labels = namz , tick=TRUE , cex.axis = .8 , las=2 ) axis( side = 2 , at = seq(0,1,.1) , labels = seq(0,1,.1) ) My thanks to Steven Tucker, Joerg van den Hoff, and Michal Kubovy for their suggesions All the best, Phil Smith CDC -----Original Message----- From: Smith, Phil (CDC/CCID/NCIRD) Sent: Thu 2/22/2007 2:56 PM To: r-help@stat.math.ethz.ch Cc: Subject: question about boxplot Here is a question from an old guy: I want to use the boxplot function as follows: boxplot( p.prop ~ R + bins ) This command makes nice boxplot for the factor "R" crossed with the factor "bins". I am having alot of trouble getting control of the labels on the X axis. I want to control it more by specifying what the labels are, controling the 'size' of those labels (by using cex), and then control the rotation of the character strings of those labels (by using srt or crt). There is a "names" argument to boxplot, but I haven't had much luck controlling what it prints, the size of the font, and the character rotation. Can somebody enlighten me on how to do this? Please respond to my work email address: [EMAIL PROTECTED] Many thanks! Phil Smith Centers for Disease COntrol and Prevention [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.