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

3 views (last 30 days)
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

Accepted Answer

KSSV
KSSV on 28 Nov 2017
X = [1 3 0.5 2.5 2];
figure
subplot(121)
bar(X)
subplot(122)
pie(X)

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!