0
grid
연습을 위해 플롯 기호를 조정하려고합니다. 이 아이디어는 최소/최대 값을 수직선과 연결하여 두 기호 &이 동일한 외곽선없이 채워지도록합니다.R :: grid를 사용하여 기호 속성 편집
대부분의 단계를 파악했습니다. 내 문제는 기호 개요를 제거하고 기호를 변경하는 것입니다.
library(grid)
n <- 10
mins <- 10*runif(n)
maxs <- mins + 5*runif(n)
grid.newpage()
pushViewport(plotViewport(c(5.1, 4.1, 4.1, 2.1)))
vp <- dataViewport(xData = 1:n , yData = c(mins,maxs) , name = "theRegion")
pushViewport(vp)
grid.rect()
grid.points(1:n,mins , gp = gpar(pch=2,col="blue",fill="blue"))
grid.edit("dataSymbols",pch=2)
# --------------------------------
# Error in editDLfromGPath(gPath, specs, strict, grep, global, redraw) :
# 'gPath' (dataSymbols) not found
# --------------------------------
grid.points(1:n,maxs, gp = gpar(pch=2,col="yellow"))
grid.xaxis()
grid.yaxis()
for(i in 1:n){
grid.lines(x = unit(c(i,i),"native"),
y = unit(c(mins[i],maxs[i]),"native"),
gp = gpar(col = "green",lwd=6))
}