rose(directiondata) creates a rose graph with 0 degrees on the right. How do I use commands to rotate the whole graph so 0 degrees is at the top, 90 on the right etc.?

4 Ansichten (letzte 30 Tage)
Gary am 10 Dez. 2012
I used the command
rose(data); [where data is an array of compass directions]
This produces a circular graph with compass directions (degrees) labeling the outside of the circle and a circular array of polygons inside the circle that show the frequency of directions in 12 direction bins. The default orientation has 0 degrees on the right, 90 degrees at the top, 180 on the left etc.
I want to use commands to rotate the whole graph so 0 degrees is at the top, 90 degrees on the right etc. How is this done?
Gary
0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jonathan Epperl am 10 Dez. 2012
I don't think that is something that is easy to achieve, due to the fact that the rose command pieces a lot of things together to generate the eventual figure.
If you want to rotate the figures to include them in a presentation or something like that, a workaround could be to rotate all the text in Matlab, then export to eps or png or whatever you're going to use, and then rotate the graphic file before you insert it into your document (in latex, the graphicx package lets you rotate pictures easily). For example:
rose(sunspot(:,2));
texthandles = findall(gca,'Type','Text');
set(texthandles,'Rotation',-90)
Now you can export and then rotate by 90 degrees, the 0-degree axis will be on the top.
Alternatively, maybe the FEX has something for you.
1 Kommentar-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden
Gary am 18 Dez. 2012
Thank you very much for your answer. It appears not to be possible to use the 'rose' command to rotate all elements of the graph, so I think it is quickest to use the plot editor in MATLAB to do this. One simply activates the 'rotate' mode and manipulates the image to put 0 degrees at the top with the other directions displayed as on a compass.
Gary

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by