2013-09-24 13 views
1

我試圖從圓形包中使用plot.circular從R中鴿子消失軸承數據。我的R包是最新的圓形圖誤差,一些數據偏離零,圖內

目前我有兩個問題 1)出於某種原因,軸承在270和90被繪製接近0比他們應該。 2)我想繪製圓內而不是將其

乾杯 外約什數據

示例代碼:

###Data 
VB<-rad(c(0,90,90,180,180,180,270,270,270,270)) 

##Make circular 
VB<-as.circular(VB, type = 'angles',units = "radians", 
     template = "none", modulo = "asis", 
     zero = pi/2, rotation = c("clock")) 

##Plot 
plot.circular(VB, pch = 16, cex = 1, stack = TRUE, 
    axes = FALSE, sep = 0.07, shrink = 1, bins = NULL, ticks = FALSE, 
    tcl = 0.025, tcl.text = 0.125, col = NULL, tol = 0.04, uin = NULL, 
    xlim = c(-1, 1), ylim = c(-1, 1), digits = 6, units = "radians", 
    template = NULL, zero = pi/2, rotation = "clock", 
    main = "", sub="", xlab = "", ylab = "", 
    control.circle=circle.control()) 

回答

1

的放錯位置的點是顯然是由於方式的倉是形成。 嘗試將bins參數設置爲某個較大的值。

plot(VB, stack=TRUE, bins=360) 

要在圓內繪圖,可以對sep參數使用負值。

plot(VB, stack=TRUE, bins=360, sep=-.07) 
+0

您是不是要找'plot.circular(VB,堆棧= TRUE,箱= 360,九月= - 。07)'? –

+1

既然'VB'是類'circular'的對象,'plot'實際上調用'plot.circular':那將是等價的。 –

+0

完美!謝謝。 –