This is an example of creating a stacked bar plot with error bars using bar. Note the parameters yerr used for error bars, and bottom to stack the bars.
Github: https://github.com/markumreed/data_science_for_everyone
p5.js Collection: https://editor.p5js.org/markumreed/collections/sfG4oKTVL
LinkedIn: https://www.linkedin.com/company/data-science-for-everyone