How to find the best fit of inner cut ellipse to points in polar plot?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to find the best fit of inner cut ellipse to points in polar plot?

R help mailing list-2
hi,

1. How to find the best fit of  inner cut ellipse to points in polar plot?

2. How can we find the ellipse passing through  most of the points in polar plot?

And can we get the center x, center y, major radius, minor radius, and rotation angle of the ellipse?

The csv data is attached.

Thanks.
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

回复:How to find the best fit of inner cut ellipse to points in polar plot?

R help mailing list-2



 ---- 在 星期二, 03 十二月 2019 04:09:12 -0800 vod vos <[hidden email]> 撰写 ----
 > hi,
 >
 > 1. How to find the best fit of  inner cut ellipse to points in polar plot?
 >
 > 2. How can we find the ellipse passing through  most of the points in polar plot?
 >
 > And can we get the center x, center y, major radius, minor radius, and rotation angle of the ellipse?
 >
 > The csv data is attached.
 >
 > Thanks.

We need just consider the r and theta columns in polar coordinate.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: How to find the best fit of inner cut ellipse to points in polar plot?

Abby Spurdle
In reply to this post by R help mailing list-2
(1) There is no csv attached (may have been removed).
(2) If you have a "polar plot", then wouldn't the "center" be the
origin of the plot/coordinates?
(3) If you don't need an exact ellipse, you could transform your
coordinates into cartesian coordinates, and then use a periodic form
of regression.
(4) If you need an exact ellipse, then you would have (three?)
parameters, ignoring the center.
If you work out the R formula, then you could try nonlinear
regression, to estimate those parameters, maybe...

On Wed, Dec 4, 2019 at 1:09 AM vod vos via R-help <[hidden email]> wrote:

>
> hi,
>
> 1. How to find the best fit of  inner cut ellipse to points in polar plot?
>
> 2. How can we find the ellipse passing through  most of the points in polar plot?
>
> And can we get the center x, center y, major radius, minor radius, and rotation angle of the ellipse?
>
> The csv data is attached.
>
> Thanks.
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: 回复:How to find the best fit of inner cut ellipse to points in polar plot?

Jim Lemon-4
In reply to this post by R help mailing list-2
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 <[hidden email]> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

vv.png (90K) Download Attachment