Navigation

Operators and Keywords

Function List:

C++ API

Function File: rose (th)
Function File: rose (th, nbins)
Function File: rose (th, bins)
Function File: rose (hax, …)
Function File: h = rose (…)
Function File: [thout rout] = rose (…)

Plot an angular histogram.

With one vector argument, th, plot the histogram with 20 angular bins. If th is a matrix then each column of th produces a separate histogram.

If nbins is given and is a scalar, then the histogram is produced with nbin bins. If bins is a vector, then the center of each bin is defined by the values of bins and the number of bins is given by the number of elements in bins.

If the first argument hax is an axes handle, then plot into this axis, rather than the current axes returned by gca.

The optional return value h is a vector of graphics handles to the line objects representing each histogram.

If two output arguments are requested then no plot is made and the polar vectors necessary to plot the histogram are returned instead.

[th, r] = rose ([2*randn(1e5,1), pi + 2*randn(1e5,1)]);
polar (th, r);

See also: hist, polar.

Demonstration 1

The following code

 clf;
 rose (2*randn (1e5, 1), 8);
 title ('rose() angular histogram plot with 8 bins');

Produces the following figure

Figure 1

Demonstration 2

The following code

 clf;
 rose ([2*randn(1e5, 1), pi + 2*randn(1e5, 1)]);
 title ('rose() angular histogram plot with 2 data series');

Produces the following figure

Figure 1

Package: octave