Different scales of multipanel plots using lattice package in R

天涯浪子 提交于 2019-12-11 10:11:47

问题


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.


回答1:


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"))


来源:https://stackoverflow.com/questions/23928834/different-scales-of-multipanel-plots-using-lattice-package-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!