Draw ellipses around points

后端 未结 2 1782
无人及你
无人及你 2020-12-21 05:01

I\'m trying to draw ellipses around points of a group on a graph, with matplotlib. I would like to obtain something like this:

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-21 05:45

    This is a well-studied problem. First take the convex hull of the set of points you wish to enclose. Then perform computations as described in the literature. I provide two sources below.

    "Smallest Enclosing Ellipses--An Exact and Generic Implementation in C++" (abstract link).


              Ellipse


    Charles F. Van Loan. "Using the Ellipse to Fit and Enclose Data Points." (PDF download).

提交回复
热议问题