How can I create a figure with a pie chart and a bar in the same window using subplot

How can I create a figure with a pie chart and a bar in the same window using subplot? I haven't used any inbuilt functions and I just want to know how to get them in the same window with different axis

 Réponse acceptée

X = [1 3 0.5 2.5 2];
figure
subplot(121)
bar(X)
subplot(122)
pie(X)

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