# Violin Plot Tool

Version:
2022.3

#### One Tool Example

Violin Plot has a One Tool Example. Visit Sample Workflows to learn how to access this and many other examples directly in Alteryx Designer.

Use Violin Plot to show the distribution of a single numeric variable, and convey the density of the distribution based on a kernel smoother that indicates the density of values (via width) of the numeric field.

The inner portion of each violin is a box and whisker plot of the data, where the bottom and top of the inner box are at the first and third quartiles, and the white circle inside the box is at the median for the measure. The vertical bars that extend above and below the box indicate the range of the data that is within 1.5 times the interquartile range (where the interquartile range is the difference between the values of the third and first quartiles).

In addition to concisely showing the nature of the distribution of a numeric variable, violin plots are an excellent way of visualizing the relationship between a numeric and categorical variable by creating a separate violin plot for each value of the categorical variable.

This tool uses the R tool. Go to Options > Download Predictive Tools and sign in to the Alteryx Downloads and Licenses portal to install R and the packages used by the R tool. Visit Download and Use Predictive Tools.

## Connect Input

An Alteryx data stream with at least one numeric field.

## Configure the Tool

#### Main Configuration Tab

• Field to plot: The numeric field (column) to plot.
• Plot by groups: Indicates whether a categorical variable will be used to group observations based on its levels to create a violin plot for each level. When this option is selected, you are asked to indicate which categorical variable to use to create groups.
• Enter a title for the plot: An optional main title for the plot.

#### Graphics Options Tab

• Plot size: Specify the width and height dimensions of the resulting plot, using either inches or centimeters.
• Graph resolution: Select the resolution of the graph in dots per inch: 1x (96 dpi), 2x (192 dpi), or 3x (288 dpi).
• Lower resolution creates a smaller file and is best for viewing on a monitor.
• Higher resolution creates a larger file with better print quality.
• Base font size (points): The point size of the base font used to produce the title and labels of the plots to be produced. The plotting functions will expand the size of the plot title to be larger than the base font automatically.

## View the Output

Outputs an Alteryx graph object.
*http://en.wikipedia.org/wiki/Violin_plot