Hello:
In generally, pie chart shows anti-clock wise orientation with its shades. How to orient it to clock wise direction?

 채택된 답변

Voss
Voss 2023년 7월 21일
X = [1 3 0.5 2.5 2];
Anti-clockwise (original):
pie(X)
Clockwise:
h = pie(X);
set(h(2:2:end),{'HorizontalAlignment'},get(h(end:-2:2),{'HorizontalAlignment'}))
set(gca(),'XDir','reverse')

댓글 수: 3

Or, if you don't care about preserving which colors map to which numbers, and just want the numbers to go clockwise:
X = [1 3 0.5 2.5 2];
pie(flip(X))
Thank you!
Voss
Voss 2023년 7월 21일
편집: Voss 2023년 7월 21일
You're welcome!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Pie Charts에 대해 자세히 알아보기

태그

질문:

2023년 7월 21일

편집:

2023년 7월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by