polarhistogram
Histogram of angles drawn on polar axes.
Category: Graphics > 2-D and 3-D Plots
Syntax
polarhistogram(theta)
Bins the angles theta in radians and draws the counts as wedges.
polarhistogram(theta, nbins)
Uses nbins equal bins covering the full circle.
polarhistogram(theta, edges)
Uses the vector edges as bin edges.
h = polarhistogram(___)
Also returns the PolarHistogram object.
Description
It is the circular version of histogram and suits directional data such as wind directions or times of day mapped to angles. The size of each wedge shows the count in that angular interval.
Input arguments
theta- Angles in radians. Angles outside
[0, 2*pi)are wrapped around. nbins- Number of bins.
'Normalization'- Same choices as for
histogram, such as'probability'.
Output arguments
h- Object with
Values,BinEdgesandNumBins.
Example
Counts in four quadrants
theta = [0.1 0.2 1 2 3];
h = polarhistogram(theta, 4);
h.Values
h.NumBins
Output
ans = 1×4
3 2 0 0
ans = 4