我正在使用 plotrix 包根据我的测量结果制作极坐标。
看起来即使我提供了从 1 到 360 度(或等于 0 到 359)的所有极坐标的测量值,第一个点和最后一个点也没有连接。例如
require(plotrix)
polar.plot(seq(1,360),polar.pos=1:360,radial.lim=c(0,361),rp.type="l")
我发现一个快速而肮脏的解决方法是再添加一个测量点,所以使用 361 代替 360
作为
polar.plot(seq(1,360),polar.pos=0:360,radial.lim=c(0,361),rp.type="l")
给出警告信息。
Warning messages:
1: In cos(radial.pos[i, ]) * lengths[i, ] :
longer object length is not a multiple of shorter object length
2: In sin(radial.pos[i, ]) * lengths[i, ] :
longer object length is not a multiple of shorter object length
有没有其他选择,因为我不喜欢显示我的最终用户警告消息:)
感谢您的回复
问候亚历克斯