Ellps

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

Purpose

Plots an ellipse on an existing figure.

Synopsis

h=ellps(cnt,a,lc,ang,pax,zh)

Description

ELLPS plots an ellipse on an existing figure e.g. an ellipse of constant Hotelling's T2. The inputs are a 2 element vector containing the ellipse center cnt, and a 2 element vector containing the ellipse axes sizes a. Optional inputs are lc which defines the line color (e.g. '-g'), and ang which defines the angle of rotation from the x-axis {default: ang = 0 radians}.

ellps([4 5],[3 1.5],':g') plots a dotted green ellipse with center (4,5), semimajor axis 3 parallel to the x-axis and semiminor 1.5 parallel to the y-axis.

Optional inputs pax and zh are used when plotting in a 3D figure. pax defines the axis perpendicular to the plane of the ellipse [1 = x-axis, 2 = y-axis, 3 = z-axis], and zh defines the distance along the pax axis to plot the ellipse.

ellps([2 3],[4 1.5],'-b',pi/4,3,2) plots an ellipse in a plane perpendicular to the z-axis at a height of z = 2.

Inputs

  • cnt: vector containing the coordinates of the ellipse center
  • a: vector containing ellipse axis sizes

Optional Inputs

  • lc: string describing line color and type (same syntax as plot function)
  • ang: angle of rotation relative to the x-axis
  • pax: axis perpendicular to the plane of the ellipse for 3D figure (1: x-axis; 2: y-axis; 3: z-axis)
  • zh: distance along the pax axis to plot the ellipse

Outputs

  • h: handle to ellipse line object

See Also

dp, hline, vline, zline