class_docstr: Draw an axis-aligned ellipse at the specified x,y position with
  the given orientation.
  
  The simplest (default) Ellipse is a circle, specified using:
  
  Ellipse(x,y, diameter)
  
  A circle is a degenerate ellipse where the width and height are
  equal. To specify these explicitly, you can use:
  
  Ellipse(x,y, (width, height))
  
  There is also an aspect parameter allowing you to generate an ellipse
  by specifying a multiplicating factor that will be applied to the
  height only.
  
  Note that as a subclass of Path, internally an Ellipse is a
  sequence of (x,y) sample positions. Ellipse could also be
  implemented as an annotation that uses a dedicated ellipse artist.
class_docstr_tok: ["Draw","an","axis-aligned","ellipse","at","the","specified","x",",","y","position","with","the","given","orientation",".","The","simplest","(","default",")","Ellipse","is","a","circle",",","specified","using",":","Ellipse","(","x",",","y",",","diameter",")","A","circle","is","a","degenerate","ellipse","where","the","width","and","height","are","equal",".","To","specify","these","explicitly",",","you","can","use",":","Ellipse","(","x",",","y",",","(","width",",","height",")",")","There","is","also","an","aspect","parameter","allowing","you","to","generate","an","ellipse","by","specifying","a","multiplicating","factor","that","will","be","applied","to","the","height","only",".","Note","that","as","a","subclass","of","Path",",","internally","an","Ellipse","is","a","sequence","of","(","x",",","y",")","sample","positions",".","Ellipse","could","also","be","implemented","as","an","annotation","that","uses","a","dedicated","ellipse","artist","."]
code: def __init__(self, x, y, spec, **params):
      if isinstance(spec, tuple):
          if "aspect" in params:
              raise ValueError(
                  "Aspect parameter not supported when supplying "
                  "(width, height) specification."
              )
          (width, height) = spec
      else:
          width, height = params.get("width", spec), spec
  
      params["width"] = params.get("width", width)
      super().__init__(x=x, y=y, height=height, **params)
      angles = np.linspace(0, 2 * np.pi, self.samples)
      half_width = (self.width * self.aspect) / 2.0
      half_height = self.height / 2.0
      # create points
      ellipse = np.array(
          list(
              zip(
                  half_width * np.sin(angles),
                  half_height * np.cos(angles),
              )
          )
      )
      # rotate ellipse and add offset
      rot = np.array(
          [
              [np.cos(self.orientation), -np.sin(self.orientation)],
              [np.sin(self.orientation), np.cos(self.orientation)],
          ]
      )
      self.data = [
          np.tensordot(rot, ellipse.T, axes=[1, 0]).T + np.array([x, y])
      ]
  
imports: import numpy
  import param
  from ..core import Dataset
  from ..core.data import MultiInterface
  from ..core.dimension import Dimension
  from .geom import Geometry
  from .selection import SelectionPolyExpr
label_desc: Use image node_id 1 to create a new Ellipse object from inherited base classes: BaseShape with example: obj = Ellipse(x, y, spec)