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.

 채택된 답변

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);

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Polar Plots에 대해 자세히 알아보기

제품

릴리스

R2006b

Community Treasure Hunt

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

Start Hunting!

Translated by