Harun
Harun

Reputation: 19

Different scales of multipanel plots using lattice package in R

I followed the script of agstudy in this page and produced panel of box-plots like this Figure

But the I have a different kind of problem; the ranges of the variables are different. Therefore, plots except for 'moisture' are not properly scaled. How can I force lattice to scale the plots as per their own range? Thanks in advance.

Upvotes: 1

Views: 3261

Answers (1)

MrFlick
MrFlick

Reputation: 206167

With lattice, you can make each panel have it's own scales with the "relation" property. The "free" option lets all of the panels be independent. See ?xyplot for other options.

 bwplot(value~Label |variable,    ## see the powerful conditional formula 
        data=dat.m,
        between=list(y=1),
        main="Bad or Good", scales=list(relation="free"))

Upvotes: 7

Related Questions