3
我想在使用晶格包創建的我的條形圖的條上添加數據值。以下是我的代碼的快照。在條形圖中的數據值標籤的錯誤順序R
不幸的是,欄頂部的數值出現錯誤。例如,在具有3.02E-10值的欄上方顯示4.76E-10等等。有人可以幫我解決這個問題。
enter code here
p <- barchart (one_cir$Value~one_cir$bias, horiz=FALSE,xlim=select_bias, ylim=yrange, data=one_cir,
groups=droplevels(one_cir$Model),
xlab=list("RVBS (V)",cex=1.3),ylab=list("Delay (ps)",cex=1.3),
main="SVT Circuit Analysis: Delay vs RVBS",
panel = function(x,y,...){
panel.barchart(x,y,...)
panel.grid(h=-1, v=0, col="gray")
panel.text(x,y,label = one_cir$Value, pos=1,cex=1.2)
},scales=list(cex=1.2),
auto.key=list(x = .81, y = 1, corner = c(0, 0),half=FALSE,points = FALSE, cex=1.2, rectangles = TRUE)
)
print(p)
樣本數據集
bias Circuits Model Temp Corner Parameter Value
0.0 NOR2 11C 25 3-TT delay_DDC 3.02e-10
0.3 NOR2 11C 25 3-TT delay_DDC 3.79e-10
0.6 NOR2 11C 25 3-TT delay_DDC 4.92e-10
0.0 NOR2 11B 25 3-TT delay_DDC 2.90e-10
0.3 NOR2 11B 25 3-TT delay_DDC 3.66e-10
0.6 NOR2 11B 25 3-TT delay_DDC 4.76e-10
請添加你所得到的一個spanshot。我運行你的代碼,它運行良好。 – aatrujillob 2012-02-10 02:31:07
panel.text(x + rep(c(.25, - 。25),3),y,label = one_cir $ Value [order(one_cir $ bias)],pos = 3,cex = 1.2)更多,稍後會提供更全面的答案 – 2012-02-10 20:00:30