0
我想在我的地塊上繪製幾個(現在可以說 - 5)細分。我已經嘗試了segments()函數,但它只繪製了5個給定座標中的兩個線段。下面是代碼:地塊上的細分
begs <- c(34573131,35072050,35471145, 35746065,36504818)
ends <- c(34887083,35139735,35557793,35789178,36950091)
step <- 820000
plot(1, xlim = c(33900000,38000000), axes = F, xlab="Position")
axis(1, at = seq(33900000,38000000, by=step), labels=format(seq(33900000,38000000, by=step)/1e6, scientific=F, digits=3))
axis(4, at = seq(0,2,length.out = 5), labels = seq(0,2,length.out = 5))
segments(x0 = begs, x1 = ends, y0 = c(0.1, 0.5 , 0.9 ,1.4, 1.9))
,情節看起來像這樣:
你Y軸不夠長。將'ylim = c(0,2)'添加到'plot()'命令中。 – 2014-08-27 14:23:23