This article describes how to create a Bean plot. A Bean Plot is a mirrored density plot, with a rug plot between the densities showing unique values. Similar to a boxplot and histogram, bean plots are used to compare the distributions of different groups.
Requirements
You need a variable containing numeric data, either in a loaded data set or a table.
Method
- Go to Visualization > Distributions > Bean.
- Under Data > Data Source > Variables select your numeric variable.
- If your numeric data is stored in a table rather than a numeric variable, use Data > Data Source > Data and select the appropriate table.
- In the Groups box, select a grouping variable.
- Click Calculate and/or ensure Automatic is checked.
Options
The below options are specific to this chart type, available in the Object Inspector under Chart > Appearance.
- Plot vertically Rotates the bean plot by 90 degrees.
- Data value color Sets the value of the dashes in the rug.
- Bandwidth The relative width of the bandwidth used to compute the density (the smaller the value, the 'bumpier' the plot).
- Automatically compute lower bound If selected, the left side of the plot is set to the lowest value observed in the other data. Otherwise, it is set to be further to the left than this, to create a smooth end to the plot.
Acknowledgments
The density is computed using the base R density function and the plot is created using plotly.