Skip to Main Content Skip to Search
Product Documentation

rose - Angle histogram plot

Example of rose function output

Alternatives

To graph selected variables, use the Plot Selector in the Workspace Browser, or use the Figure Palette Plot Catalog. Manipulate graphs in plot edit mode with the Property Editor. For details, see Plotting Tools — Interactive Plotting in the MATLAB Graphics documentation and Creating Graphics from the Workspace Browser in the MATLAB Desktop Tools documentation.

Syntax

rose(theta)
rose(theta,x)
rose(theta,nbins)
rose(axes_handle,...)
h = rose(...)
[tout,rout] = rose(...)

Description

rose(theta) creates an angle histogram, which is a polar plot showing the distribution of values grouped according to their numeric range, showing the distribution of theta in 20 angle bins or less. The vector theta, expressed in radians, determines the angle of each bin from the origin. The length of each bin reflects the number of elements in theta that fall within a group, which ranges from 0 to the greatest number of elements deposited in any one bin.

rose(theta,x) uses the vector x to specify the number and the locations of bins. length(x) is the number of bins and the values of x specify the center angle of each bin. For example, if x is a five-element vector, rose distributes the elements of theta in five bins centered at the specified x values.

rose(theta,nbins) plots nbins equally spaced bins in the range [0, 2*pi]. The default is 20.

rose(axes_handle,...) plots into the axes with handle axes_handle instead of the current axes (gca).

h = rose(...) returns the handles of the line objects used to create the graph.

[tout,rout] = rose(...) returns the vectors tout and rout so polar(tout,rout) generates the histogram for the data. This syntax does not generate a plot.

Examples

Load data on sunspot activity over 288 years. Generate a rose histogram of the number of sunspots observed using 12 bins.

figure
load sunspot.dat  % Contains a 2-column vector named sunspot
rose(sunspot(:,2),12)

See Also

compass | feather | hist | line | polar

How To

  


» Learn more
» Download free kit
» Get trial software

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS