polarplot
Plots lines on polar axes from angles and radii.
Category: Graphics > 2-D and 3-D Plots
Syntax
polarplot(theta, rho)
Plots radius rho against angle theta in radians.
polarplot(rho)
Plots rho at equally spaced angles from 0 to 2*pi.
polarplot(Z)
For complex Z, uses the angle and magnitude of each element.
polarplot(___, LineSpec)
Sets color, line style and marker.
polarplot(pax, ___)
Plots into the polar axes pax.
h = polarplot(___)
Also returns the line handles.
Description
The angle starts at the right and grows counterclockwise by default, and these conventions can be changed through properties of the polar axes. The radial axis is adjusted with rlim, rticks and the other r... functions, and thetalim and thetaticks do the same for the angle.
Input arguments
theta- Angles in radians.
rho- Radii, the same size as
theta. pax- PolarAxes object from
polaraxes.
Output arguments
h- Handles of the lines.
Example
Limaçon
theta = linspace(0, 2*pi, 400);
polarplot(theta, 1 + 2*cos(theta), 'LineWidth', 2)
In the app, the figure is drawn below the code.