I am trying to create a grouped, stacked bar chart. I was able to do it in excel and this image shows what I am trying to create but I want to do it through Python. I have all the data in a pandas data frame that is able to create separate stacked bar charts but I cannot get the grouping as seen in excel.
Excel Formatting:
If you could do it in Excel with easy then I strongly suggest you to do it with Excel. Unless you have other requirements.
There are many libraries you can use to create this type of plot: matplotlib
, seaborn
, or plotly
. The one I use most is plotly
. You can see the list of sample figures of plotly
here: https://plotly.com/python/
Or you can join plotly
community, there are many pros there might help with figure. I find there is few pros on figures in stackoverflow to plotly community: https://community.plotly.com/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.