Skip to content

x-axis labelling

4 messages · David Winsemius, Alfredo

#
On Feb 1, 2013, at 9:30 AM, Alfredo Tello wrote:

            
Why not:

db<-data.frame(date=as.factor(c(1:50)),var=rnorm(50))
barplot(db$var,names.arg=ifelse( rep( c(TRUE,FALSE),  
length=length(levels(db$date) ) ),  levels(db$date),  
""),las=2,cex.axis=0.8,cex=0.8)

barplot(db$var,names.arg=ifelse( c(TRUE,FALSE),  levels(db$date),  
""},las=2,cex.axis=0.8,cex=0.8)


-- David.
David Winsemius, MD
Alameda, CA, USA
2 days later
#
On Feb 4, 2013, at 4:00 AM, Alfredo Tello wrote:

            
Did you look at your graphics window? On my machine the plot you asked for was created by the preceding line:

 
barplot(db$var, 
       names.arg=ifelse( rep( c(TRUE,FALSE), length=length(levels(db$date) ) ),  levels(db$date), ""), 
       las=2,cex.axis=0.8,cex=0.8)

True, the line in question was copied to the message by mistake, but an arguably workable answer was presented.