【发布时间】:2012-04-19 15:38:37
【问题描述】:
我有一个距离序列,我想在 spatstat 中绘制一条线。示例:
library(spatstat)
x <- c(0.3, 5)
y <- c(3, 1.2)
range.x <- c(0, max(x)+0.2)
range.y <- c(0, max(y)+0.2)
owin <- owin(range.x, range.y)
the.line <- psp(x0 = x[1],x1 = x[2],y0 = y[1],y1 = y[2], window = owin)
plot(the.line)
seqs <- data.frame(name = seq(1,7), distance = c(0.12, 0.3, 0.45, 0.5, 0.7, 0.89, 0.95))
lengths <- seqs$distance*lengths.psp(the.line)
我想在the.line 之上绘制lengths,使用seqs$name 作为标签以下列方式(使用Illustrator 添加的标签):
有人知道怎么做吗?非常感谢您的帮助!
【问题讨论】: