polarscatter

Scatter plot of points given in polar coordinates.

Category: Graphics > 2-D and 3-D Plots

Syntax

polarscatter(theta, r)

Draws a marker at each angle and radius.

polarscatter(theta, r, sz)

Sets the marker area.

polarscatter(theta, r, sz, c)

Sets the marker color.

polarscatter(___, 'filled')

Fills the markers.

s = polarscatter(___)

Also returns the Scatter object.

Description

It is scatter on polar axes, for data that is naturally angle and distance, such as bearings and ranges. The polar axes can be customized with rlim, rticks and related functions.

Input arguments

theta
Angles in radians.
r
Radii.
sz
Marker area in points squared, scalar or one value per point.
c
Color spec, RGB triplet, or values mapped through the colormap.

Output arguments

s
Scatter object.

Example

Bearings and ranges

theta = deg2rad([10 80 150 220 300]);
r = [3 5 2 4 6];
polarscatter(theta, r, 60, r, 'filled')
colorbar

In the app, the figure is drawn below the code.

See also

polarplot polarbubblechart scatter polaraxes