[R] 回复:How to find the best fit of inner cut ellipse to points in polar plot?
Jim Lemon
drj|m|emon @end|ng |rom gm@||@com
Wed Dec 4 03:16:33 CET 2019
Hi vod,
Now that I have your data I can do a bit better:
# save data as "vv.csv"
vv<-read.csv("vv.csv")
# order the points in order of theta
vv<-vv[order(vv$theta),]
oldpar<-polar.plot(vv$r,vv$theta,main="Polar plat of vv.csv",lwd=3,line.col=4,
point.symbols=4,rp.type="p",show.centroid=TRUE,radial.lim=c(0,max(vv$r)))
draw.circle(0.3,0.15,radius=2.5,lwd=2,border="red")
draw.ellipse(0.28,0.15,a=2.6,b=2.5,angle=19,border="green")
Using a circle (red) there is not much left to explain. Adjusting the
major and minor axes and the angle gives a pretty good fit.
Jim
On Wed, Dec 4, 2019 at 10:44 AM vod vos <vodvos using zoho.com> wrote:
>
> Hi drjimlemon,
> Thank you, but it seems no working.
> The raw csv file is here, we need just consider the r and theta columns in polar coordinate.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vv.png
Type: image/png
Size: 67427 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20191204/928347e8/attachment.png>
More information about the R-help
mailing list