Ellps: Difference between revisions
imported>Jeremy (Importing text file) |
imported>Jeremy (Importing text file) |
||
Line 1: | Line 1: | ||
===Purpose=== | ===Purpose=== | ||
Plots an ellipse on an existing figure. | Plots an ellipse on an existing figure. | ||
===Synopsis=== | ===Synopsis=== | ||
:ellps(cnt,a,''lc,ang,pax,zh'') | :ellps(cnt,a,''lc,ang,pax,zh'') | ||
===Description=== | ===Description=== | ||
ELLPS plots an ellipse on an existing figure e.g. an ellipse of constant Hotelling's T<sup>2</sup>. 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 plots an ellipse on an existing figure e.g. an ellipse of constant Hotelling's T<sup>2</sup>. 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. | 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 perpindicular 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. | Optional inputs ''pax'' and ''zh'' are used when plotting in a 3D figure. ''pax'' defines the axis perpindicular 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 perpindicular to the z-axis at a heightof z = 2. | ellps([2 3],[4 1.5],'-b',pi/4,3,2) plots an ellipse in a plane perpindicular to the z-axis at a heightof z = 2. | ||
===See Also=== | ===See Also=== | ||
[[dp]], [[hline]], [[vline]], [[zline]] | [[dp]], [[hline]], [[vline]], [[zline]] |
Revision as of 15:25, 3 September 2008
Purpose
Plots an ellipse on an existing figure.
Synopsis
- 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 perpindicular 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 perpindicular to the z-axis at a heightof z = 2.