How can I change the order of the angles in a ROSE plot in MATLAB?

The default behavior of the ROSE function is to plot with 0 degrees on the right and angles increasing in an anti-clockwise fashion. I would like to change this so that the 0 degrees is at the top and the angles increase in a clockwise fashion.

 Accepted Answer

To change the way in which the angles are ordered in the output plot of the ROSE function, you can use the VIEW function.
The VIEW function allows you to view the plot from a different position. You can use this function to adjust the view to a point under the plot and facing towards the right to obtain a plot with 0 degrees on top and the angles increasing in a clockwise fashion.
Here is a short example:
% generate random data between 0 and 2*pi
theta = 2*pi*rand(1,50);
% construct rose plot
rose(theta);
% rotate view
view(90, -90);
The VIEW function parameters can be modified to generate plots with different angular origin and direction.

More Answers (0)

Products

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!