2015-11-05 31 views
1

我想繪製我的VAR分析的FEVD(預測誤差方差分解)。正如您在圖片上看到的那樣,圖例將圖表和信息搞砸了。因爲這是一個自動創建的圖例,我不知道如何重新定位它。我不知道很多但有關R.策劃修復plot(fevd())函數的佈局

唯一的代碼我用得到這個是:

library(vars) 
var <- VAR(varTable2 , p=4 , type = "both") 
plot(fevd(var, n.ahead = 10)) 

在此先感謝

enter image description here

回答

2

傳奇不會進行調整井R.你必須先設定你的繪圖窗口然後繪製你的數據。 這是如何在Windows中完成的。 win.graph打開指定寬度的空白繪圖窗口。在Unix/Linux中,您應該查看X11(),並在Mac中查看quartz()。你也可以考慮較短的變量名稱。

library(vars) 
data(Canada) 
colnames(Canada) <-c("Long column name1","Long column name2","Long column name3","Long column name4") 
var <- VAR(Canada , p=4 , type = "both") 
win.graph(width=13,height=8) 
plot(fevd(var, n.ahead = 10)) 

enter image description here