Plotting Stacked Bar Plots
The Stacked Bar Plot is made up of rectangular bars, where each bar displays all the values of the corresponding attribute, stacked one above the other, within a single bin.
It contains the following attributes:
Attribute | Mandatory | Constraints |
---|---|---|
x | Either x or y must be specified | |
y | Either x or y must be specified | It cannot be a nominal value |
target | No |
Properties
Category | Properties | Description |
---|---|---|
General | Fitting curve | If Normal Distribution is selected, the Gaussian curve that best fits the data distribution is drawn. Continuous attributes only. |
Show null values | If selected missing values are displayed. | |
Reverse order | If selected, the order of values in the x axis is reversed. By default the order is a-z; if selected the order becomes z-a. Nominal attributes only. | |
Sort by value | If selected bars are sorted according to the value of their height (i.e. the y value). Nominal attributes only | |
Orientation | Displays the bars vertically or horizontally. | |
Displayed value | Select which value should be plotted from the following possibilities:
For example if x has three values: a, b and c and the average (or sum, mode etc.) of y is 5 for a,10 for b and 20 for c. If Standard is selected as the Displayed Value the height of the three bars is 5, 10 and 20. If Total Percentage is selected the percentage is displayed. As the sum is 35, the three bars will have the following heights: 100*5/(35), 100*10/(35), 100*20/(35). | |
X attribute | Number of bins | Defines the number of displayed intervals for the attributes. |
Target attribute | Number of bins | Defines the number of displayed intervals for the attributes. |
Y attribute | Aggregate operator | The operator required to aggregate data. Possible values are average, maximum, median, minimum, mode and sum. |
Examples
The following example is based on the Adult dataset.
Scenario data can be found in the Datasets folder in your Rulex installation.
Type | Description | Result |
---|---|---|
Stacked bar plot with target | The plot is the same as the grouped bar plot with target example, but using a stacked bar visualization. |