plot_stacked_bar
Create stacked bar charts to show how a categorical variable breaks down within another. Display raw counts or normalized percentages for clearer part-to-whole comparisons.
Instructions
Stacked bar chart showing composition of one categorical within another. normalize=True shows percentages (100% stacked), False shows raw counts. Example: plot_stacked_bar(column="ProductCode", by="CargoType", normalize=True)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"column": "<column>",
"by": "<by>"
},
"name": "plot_stacked_bar"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | ||
| top_n | No | ||
| column | Yes | ||
| df_name | No | ||
| normalize | No | ||
| save_path | No |