This is an example of creating area charts, bar charts, and pie charts with some annotation in MATLAB®.
Read about the "fill", "bar", "text", and "pie" functions in the MATLAB documentation.
For more examples, go to MATLAB Plot Gallery - http://www.mathworks.com/discovery/gallery.html
MathWorks Plot Gallery Team (2019). MATLAB Plot Gallery - Area Bar Pie Charts with Annotations (https://www.mathworks.com/matlabcentral/fileexchange/35241-matlab-plot-gallery-area-bar-pie-charts-with-annotations), MATLAB Central File Exchange. Retrieved .
Added live script
Fix error resulting from change in legend function
Create scripts with code, output, and formatted text in a single executable document.