seaborn.
pointplot
(x=None, y=None, hue=None, data=None, order=None, hue_order=None, estimator=<function mean>, ci=95, n_boot=1000, units=None, markers='o', linestyles='', dodge=False, join=True, scale=1, orient=None, color=None, palette=None, ax=None, errwidth=None, capsize=None, **kwargs)¶Show point estimates and confidence intervals using scatter plot glyphs.
A point plot represents an estimate of central tendency for a numeric variable by the position of scatter plot points and provides some indication of the uncertainty around that estimate using error bars.
Point plots can be more useful than bar plots for focusing comparisons
between different levels of one or more categorical variables. They are
particularly adept at showing interactions: how the relationship between
levels of one categorical variable changes across levels of a second
categorical variable. The lines that join each point from the same hue
level allow interactions to be judged by differences in slope, which is
easier for the eyes than comparing the heights of several groups of points
or bars.
It is important to keep in mind that a point plot shows only the mean (or other estimator) value, but in many cases it may be more informative to show the distribution of values at each level of the categorical variables. In that case, other approaches such as a box or violin plot may be more appropriate.
Input data can be passed in a variety of formats, including:
x
, y
, and/or hue
parameters.x
, y
, and hue
variables will determine how the data are plotted.plt.boxplot
(e.g. a 2d array or list of vectors)In most cases, it is possible to use numpy or Python objects, but pandas objects are preferable because the associated names will be used to annotate the axes. Additionally, you can use Categorical types for the grouping variables to control the order of plot elements.
Parameters:  x, y, hue : names of variables in
data : DataFrame, array, or list of arrays, optional
order, hue_order : lists of strings, optional
estimator : callable that maps vector > scalar, optional
ci : float or None, optional
n_boot : int, optional
units : name of variable in
markers : string or list of strings, optional
linestyles : string or list of strings, optional
dodge : bool or float, optional
join : bool, optional
scale : float, optional
orient : “v”  “h”, optional
color : matplotlib color, optional
palette : seaborn color palette or dict, optional
ax : matplotlib Axes, optional


Returns:  ax : matplotlib Axes

See also
barplot
factorplot
Examples
Draw a set of vertical point plots grouped by a categorical variable:
>>> import seaborn as sns
>>> sns.set_style("darkgrid")
>>> tips = sns.load_dataset("tips")
>>> ax = sns.pointplot(x="time", y="total_bill", data=tips)
Draw a set of vertical points with nested grouping by a two variables:
>>> ax = sns.pointplot(x="time", y="total_bill", hue="smoker",
... data=tips)
Separate the points for different hue levels along the categorical axis:
>>> ax = sns.pointplot(x="time", y="total_bill", hue="smoker",
... data=tips, dodge=True)
Use a different marker and line style for the hue levels:
>>> ax = sns.pointplot(x="time", y="total_bill", hue="smoker",
... data=tips,
... markers=["o", "x"],
... linestyles=["", ""])
Draw a set of horizontal points:
>>> ax = sns.pointplot(x="tip", y="day", data=tips)
Don’t draw a line connecting each point:
>>> ax = sns.pointplot(x="tip", y="day", data=tips, join=False)
Use a different color for a singlelayer plot:
>>> ax = sns.pointplot("time", y="total_bill", data=tips,
... color="#bb3f3f")
Use a different color palette for the points:
>>> ax = sns.pointplot(x="time", y="total_bill", hue="smoker",
... data=tips, palette="Set2")
Control point order by passing an explicit order:
>>> ax = sns.pointplot(x="time", y="tip", data=tips,
... order=["Dinner", "Lunch"])
Use median as the estimate of central tendency:
>>> from numpy import median
>>> ax = sns.pointplot(x="day", y="tip", data=tips, estimator=median)
Show the standard error of the mean with the error bars:
>>> ax = sns.pointplot(x="day", y="tip", data=tips, ci=68)
Add “caps” to the error bars:
>>> ax = sns.pointplot(x="day", y="tip", data=tips, capsize=.2)