Orient pie chart in clock wise direction

6 vues (au cours des 30 derniers jours)
Poulomi Ganguli
Poulomi Ganguli le 21 Juil 2023
Modifié(e) : Voss le 21 Juil 2023
Hello:
In generally, pie chart shows anti-clock wise orientation with its shades. How to orient it to clock wise direction?

Réponse acceptée

Voss
Voss le 21 Juil 2023
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 commentaires
Poulomi Ganguli
Poulomi Ganguli le 21 Juil 2023
Thank you!
Voss
Voss le 21 Juil 2023
Modifié(e) : Voss le 21 Juil 2023
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by