For other applications, rather than showing the distribution within each category, you might want to show an estimate of the central tendency of the values. Seaborn has two main ways to show this information. Importantly, the basic API for these functions is identical to that for the ones discussed above.
A familiar style of plot that accomplishes this goal is a bar plot. In seaborn, the [`barplot()`](../generated/seaborn.barplot.html#seaborn.barplot"seaborn.barplot") function operates on a full dataset and applies a function to obtain the estimate (taking the mean by default). When there are multiple observations in each category, it also uses bootstrapping to compute a confidence interval around the estimate and plots that using error bars:
A special case for the bar plot is when you want to show the number of observations in each category rather than computing a statistic for a second variable. This is similar to a histogram over a categorical, rather than quantitative, variable. In seaborn, it’s easy to do so with the [`countplot()`](../generated/seaborn.countplot.html#seaborn.countplot"seaborn.countplot") function:
Both [`barplot()`](../generated/seaborn.barplot.html#seaborn.barplot"seaborn.barplot") and [`countplot()`](../generated/seaborn.countplot.html#seaborn.countplot"seaborn.countplot") can be invoked with all of the options discussed above, along with others that are demonstrated in the detailed documentation for each function:
An alternative style for visualizing the same information is offered by the [`pointplot()`](../generated/seaborn.pointplot.html#seaborn.pointplot"seaborn.pointplot") function. This function also encodes the value of the estimate with height on the other axis, but rather than showing a full bar, it plots the point estimate and confidence interval. Additionally, [`pointplot()`](../generated/seaborn.pointplot.html#seaborn.pointplot"seaborn.pointplot") connects points from the same `hue` category. This makes it easy to see how the main relationship is changing as a function of the hue semantic, because your eyes are quite good at picking up on differences of slopes:
When the categorical functions lack the `style` semantic of the relational functions, it can still be a good idea to vary the marker and/or linestyle along with the hue to make figures that are maximally accessible and reproduce well in black and white: