{
  "name": "Python and Statistical Software Bar Chart Stacking Feature Matrix",
  "description": "Comparative technical matrix of bar chart stacking mechanisms, parameters, normalization support, and export capabilities across scientific computing libraries compiled from official documentation.",
  "page": "https://casrai.org/guides/stacked-bar-chart-matplotlib",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-16T22:01:54Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Library",
      "unit": "",
      "description": "Software package or visualization library"
    },
    {
      "name": "Stacking Parameter",
      "unit": "",
      "description": "Core function argument or method parameter used to set vertical stacking baseline"
    },
    {
      "name": "Horizontal Stacking",
      "unit": "",
      "description": "Native parameter or method for horizontal stacked bars"
    },
    {
      "name": "Segment Labeling",
      "unit": "",
      "description": "Built-in API helper for placing centered values within bar segments"
    },
    {
      "name": "Normalized Stacking",
      "unit": "",
      "description": "Whether percentage normalization is built into plotting call or requires manual pre-calculation"
    },
    {
      "name": "License",
      "unit": "",
      "description": "Open-source software license type"
    }
  ],
  "rows": [
    {
      "Library": "Matplotlib",
      "Stacking Parameter": "bottom in ax.bar()",
      "Horizontal Stacking": "left in ax.barh()",
      "Segment Labeling": "ax.bar_label(label_type='center')",
      "Normalized Stacking": "Manual pre-calculation",
      "License": "PSF / BSD-compatible"
    },
    {
      "Library": "Pandas",
      "Stacking Parameter": "stacked=True in plot.bar()",
      "Horizontal Stacking": "stacked=True in plot.barh()",
      "Segment Labeling": "Via underlying Matplotlib ax.bar_label()",
      "Normalized Stacking": "Manual pre-normalization",
      "License": "BSD 3-Clause"
    },
    {
      "Library": "Seaborn",
      "Stacking Parameter": "multiple='stack' in histplot()",
      "Horizontal Stacking": "multiple='stack' with y=",
      "Segment Labeling": "Manual loop / Matplotlib containers",
      "Normalized Stacking": "stat='percent' or 'proportion'",
      "License": "BSD 3-Clause"
    },
    {
      "Library": "Plotly Express",
      "Stacking Parameter": "barmode='stack' (default in px.bar)",
      "Horizontal Stacking": "orientation='h' with barmode='stack'",
      "Segment Labeling": "text_auto=True",
      "Normalized Stacking": "barnorm='percent' or 'fraction'",
      "License": "MIT"
    },
    {
      "Library": "Altair",
      "Stacking Parameter": "stack='zero' (default on y)",
      "Horizontal Stacking": "stack='zero' on x",
      "Segment Labeling": "mark_text() layered",
      "Normalized Stacking": "stack='normalize'",
      "License": "BSD 3-Clause"
    },
    {
      "Library": "R ggplot2",
      "Stacking Parameter": "position='stack' in geom_bar()",
      "Horizontal Stacking": "coord_flip() or aes(y=...)",
      "Segment Labeling": "geom_text(position=position_stack(vjust=0.5))",
      "Normalized Stacking": "position='fill'",
      "License": "MIT / GPL-2"
    }
  ],
  "sources": [
    {
      "title": "Matplotlib Axes.bar Documentation",
      "url": "https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.bar.html",
      "accessed": "2026-11-14"
    },
    {
      "title": "Pandas DataFrame.plot.bar Documentation",
      "url": "https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.bar.html",
      "accessed": "2026-11-14"
    },
    {
      "title": "Seaborn histplot Documentation",
      "url": "https://seaborn.pydata.org/generated/seaborn.histplot.html",
      "accessed": "2026-11-14"
    },
    {
      "title": "Plotly Express Bar Arguments Documentation",
      "url": "https://plotly.com/python-api-reference/generated/plotly.express.bar.html",
      "accessed": "2026-11-14"
    }
  ]
}