rose
is not recommended. Use polarhistogram
instead. There are no plans to remove
rose
.
The polarhistogram
function uses graphics objects that are designed
for polar coordinate and histogram data. These objects have more relevant customization
options than the objects used by rose
. The benefits of using
polarhistogram
over rose
include:
polarhistogram
plots into a PolarAxes
object
instead of an Axes
object. For example, you can change the location
of 0 by setting the ThetaZeroLocation
property of the
PolarAxes
object.
polarhistogram
creates a Histogram
object
instead of a Line
object. For example, you can color the bins by
setting the FaceColor
property of the Histogram
object.
This table shows some typical uses of rose
and how to
update your code to use polarhistogram
instead.
Objective | Not Recommended | Recommended | Differences |
---|
Specify the number of bins. |
|
polarhistogram(theta,nbins)
| No difference. |
Specify the locations of bins. |
|
polarhistogram(theta,edges)
|
For rose , x specifies the center
angle of each bin. length(x) is the total number of
bins. For polarhistogram , edges
specifies the start and end values of each bin.
length(edges)-1 is the total number of bins.
|
Specify the target axes. |
|
|
|
Specify a PolarAxes target axes. |
[t,r] = rose(theta)
polarplot(pax,t,r)
|
polarhistogram(pax,theta)
|
rose accepts an Axes target axes
only. Use the polarplot function and specify
pax , a PolarAxes object along with two
output arguments from rose .
polarhistogram accepts a PolarAxes
target axes.
|
Modify the appearance of the angle histogram. | Then, use dot notation
with ln to change the graph appearance. | polarhistogram(theta,Name,Value) or h = polarhistogram(theta) Then,
use dot notation with h to change the graph
appearance. |
For rose , ln is a
Line object. Use dot notation to set any properties of
the line. For a list of properties, see Line Properties. For polarhistogram , h is a
Histogram object. Use dot notation or name-value
arguments to set any properties of the histogram. For a list of properties,
see Histogram Properties.
|