File Exchange

image thumbnail

MATLAB Plot Gallery - Stacked Bar Chart

Create a stacked bar chart

16 Downloads

Updated 01 Sep 2016

View License

This is an example of how to create a stacked bar chart in MATLAB®.
Read about the "bar" function in the MATLAB documentation.
For more examples, go to MATLAB Plot Gallery - http://www.mathworks.com/discovery/gallery.html

Comments and Ratings (3)

Timur Kelin

1. The order of of the colours on the bars and on the legend is opposed. This doesn't look nice.
2. Irrespective to this example: 'stack' doesn't work for a stacked single bar. Fake data for the second bar should be added to the input data.

Serena Todd

xyzmrsir

Updates

1.1.0.1

Updated license

1.1.0.0

Updated screenshot.

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Acknowledgements

Inspired: superbar

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor