aspect = 1で自由にスケーリングできますが、各パネルのx/yの範囲は同じです。以下の例では、bのx倍率は(-0.04,0.04)である必要があります。自由なスケールですが、x/yのパネル単位で同じ範囲
編集:追加の格子バージョン
library(ggplot2)
d = data.frame(x=rnorm(100),group=c("A","B"))
d$y = d$x+rnorm(100,0,0.5)
d[d$group=="B","x"]=d[d$group=="B","x"]/100
d[d$group=="B","y"]=d[d$group=="B","y"]/60
qplot(x,y,data=d,asp=1) + facet_wrap(~group,scale="free")
require(lattice)
xyplot(y~x|group, data=d,aspect=1,scales=list(relation="free"),
prepanel=function(x,y){
lims = c(min(x,y), max(x,y))
list(xlim=lims,ylim=lims)
})
+1良い質問。私は周りを見回しましたが、あなたが要求したとおりに動作させることができませんでした。 – Andrie
@アントリー:羊毛麻痺者のように、私はまずそれが私の党派の無知だと思った。あなたのコメントの後、私はスレッド[https://groups.google.com/forum/?fromgroups#!topic/ggplot2/cDzL_yHew0I[1-25]]を見つけました。これはggplot2で簡単ではないことを示しています。 –
私はその否定的なものを逃したように見える:http://stackoverflow.com/questions/7905828/multi-panel-plots-in-ggplot2-scales-that-are-free-and-equal?rq=1 –