Can I create a filled angle histogram plot with the ROSE function?

I would like to create an angle histogram plot with filled bars. I have tried using the ROSE and POLAR functions, as well as the enhanced polar-plotting functions available on the MATLAB Central File Exchange.

 Respuesta aceptada

The ROSE function calculates a single line that represents all of the bars, and then it calls POLAR to plot this line (you can see this by selecting Show Plot Tools from the figure toolbar -- one blue line represents all of the bars). There is no way to shade the enclosed regions created by this line. However, you can plot each of the bars as a PATCH object.
To do this, download the attached file, rose2.m, and place it in the following directory (where $MATLABROOT is the location of your MATLAB installation as returned by the MATLABROOT function):
$MATLABROOT\toolbox\matlab\specgraph\
The code below will create a filled histogram; you can change the color of the patch by editing line 89 of rose2.m.
theta = 2*pi*rand(1,50);
rose2(theta);

Más respuestas (0)

Categorías

Más información sobre Polar Plots en Centro de ayuda y File Exchange.

Productos

Versión

R2006b

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by