stackedBar

Create a stacked bar plot. The usage mechanics are identical to those of the no error bar overload of groupedBar().

stackedBar
(
R1
R2
)
(
,
R2 data
,
double width
,
string[] legendText = null
,
Color[] colors = null
)
if (
isInputRange!R1 &&
isRoR!R2
)

Examples

1 // Stack coffee and tea consumption on top of each other.
2 Figure(
3     stackedBar(iota(3), [[5, 3, 1], [1, 2, 3]], 0.6,
4         ["Coffee", "Tea"]
5     )
6 ).legendLocation(LegendLocation.right)
7     .title("Caffeine Consumption")
8     .xLabel("Time of Day")
9     .xTickLabels(iota(3), ["Morning", "Afternoon", "Evening"])
10     .yLabel("Beverages")
11     .showAsMain();

Meta