Skip to content
Prev 180031 / 398513 Next

lattice histogram for multiple variables : adjusting x axis

avail:
You're on the right track.  If you don't specify a breaks argument, then 
histogram calculates a common axis and breaks across all the panels. 
Declaring breaks=NULL will force it to calculate them for each panel.

histogram( 
 
as.formula(paste("~",paste(colnames(iris[,!sapply(iris,is.factor)]),collapse="+"))), 

   data=iris[,!sapply(iris,is.factor)], 
   scales=list(x=list(relation="free")),
   breaks=NULL
)

You can also specify a hist-style method, e.g. breaks="Sturges" to get 
what you want.

Regards,
Richie.

Mathematical Sciences Unit
HSL



------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}