2017-06-09 13 views
1

私はいくつかのプロットで画像を描画するのに、私はtwoord.plotを使用したとき、プロットを使用するときに画像のスケールがスケールimaginではありません。次のコードを参照してください。 twoord.plotでスケールを調整することができますどのようにimage scale in twoord.plot

rm(list=ls()) 
library(zoo) 
library(plotrix) 
library(graphics) 
library(xts) 
library(forecast) 
x=1:100 
y=rnorm(100) 
z=rnorm(100) 
par(mfrow=c(4,4)) 
plot(x,y) 
twoord.plot(x,y,x,z) 

enter image description here

?どうもありがとうございました。

答えて

0

par(mfrow=c(4,4))の代わりにsplit.screen(c(4,4))を使用して、marのグラフィックパラメータ(プロットの4辺に指定する余白の行数)を設定することが考えられます。

library(zoo) 
library(plotrix) 
library(graphics) 
library(xts) 
library(forecast) 
x <- 1:100 
y <- rnorm(100) 
z <- rnorm(100) 
split.screen(c(4,4)) 
screen(1) 
par(mar=c(1,2,1,1), oma=rep(0,4)) 
plot(x, y, xlab="", ylab="") 
screen(2) 
twoord.plot(x, y, x, z, mar=c(1,2,1,1)) 

enter image description here

+0

ありがとうございました! – DXL