[R] x-axis label for boxplot

Robert Baer rbaer at atsu.edu
Thu Feb 9 02:07:58 CET 2012


xlab =  needs to be names =   see ?boxplot

boxplot(jdata[,"x"],jdata[,"y"],jdata[,"z"],names=c("x 
values","yvalues","zvalues"))


-----Original Message----- 
From: John Sorkin
Sent: Wednesday, February 08, 2012 6:48 PM
Cc: r-help
Subject: [R] x-axis label for boxplot

I am trying to produce three boxplots and label the x axis values:
xvalues, yvalues, zvalues.

My code is below. The labels are not below the three boxplots. If you could 
show me how to get the
labels below the columns I would be appreciative.
John

jdata<-data.frame(x = 
rnorm(100),y=rnorm(100,1),z=rnorm(100,-1),y=runif(100))

boxplot(jdata[,"x"],jdata[,"y"],jdata[,"z"],xlab=c("x 
values","yvalues","zvalues"))

John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)

Confidentiality Statement:
This email message, including any attachments, is for th...{{dropped:8}}



More information about the R-help mailing list