提交 57f0e7e3 编写于 作者: F findns

Update 18.md and 19.md

上级 f296e2e9
......@@ -4,99 +4,99 @@
seaborn.boxenplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, orient=None, color=None, palette=None, saturation=0.75, width=0.8, dodge=True, k_depth='proportion', linewidth=None, scale='exponential', outlier_prop=None, ax=None, **kwargs)
```
Draw an enhanced box plot for larger datasets.
为更大的数据集绘制增强的箱型图。
This style of plot was originally named a “letter value” plot because it shows a large number of quantiles that are defined as “letter values”. It is similar to a box plot in plotting a nonparametric representation of a distribution in which all features correspond to actual observations. By plotting more quantiles, it provides more information about the shape of the distribution, particularly in the tails. For a more extensive explanation, you can read the paper that introduced the plot:
这种风格的绘图最初被命名为“信值图”,因为它显示了大量被定义为“置信区间”的分位数。它类似于绘制分布的非参数表示的箱形图,其中所有特征对应于实际观察的数值点。通过绘制更多分位数,它提供了有关分布形状的更多信息,特别是尾部数据的分布。欲了解更详细的解释,您可以阅读介绍该绘图的论文:
[https://vita.had.co.nz/papers/letter-value-plot.html](https://vita.had.co.nz/papers/letter-value-plot.html)
Input data can be passed in a variety of formats, including:
输入数据可以通过多种格式传入,包括:
* Vectors of data represented as lists, numpy arrays, or pandas Series objects passed directly to the `x`, `y`, and/or `hue` parameters.
* A “long-form” DataFrame, in which case the `x`, `y`, and `hue` variables will determine how the data are plotted.
* A “wide-form” DataFrame, such that each numeric column will be plotted.
* An array or list of vectors.
* 格式为列表,numpy数组或pandas Series对象的数据向量可以直接传递给`x``y``hue`参数。
* 对于长格式的DataFrame,`x``y`,和`hue`参数会决定如何绘制数据。
* 对于宽格式的DataFrame,每一列数值列都会被绘制。
* 一个数组或向量的列表。
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.
在大多数情况下,可以使用numpy或Python对象,但更推荐使用pandas对象,因为与数据关联的列名/行名可以用于标注横轴/纵轴的名称。此外,您可以使用分类类型对变量进行分组以控制绘图元素的顺序。
This function always treats one of the variables as categorical and draws data at ordinal positions (0, 1, … n) on the relevant axis, even when the data has a numeric or date type.
此函数始终将其中一个变量视为分类,并在相关轴上的序数位置(0,1,... n)处绘制数据,即使数据属于数值类型或日期类型也是如此。
See the [tutorial](../tutorial/categorical.html#categorical-tutorial) for more information.
更多信息请参阅 [教程](../tutorial/categorical.html#categorical-tutorial)
参数:`x, y, hue`names of variables in `data` or vector data, optional
参数:`x, y, hue``data`或向量数据中的变量名称,可选
> Inputs for plotting long-form data. See examples for interpretation.
> 用于绘制长格式数据的输入。查看样例以进一步理解。
`data`:DataFrame, array, or list of arrays, optional
`data`:DataFrame,数组,数组列表,可选
> Dataset for plotting. If `x` and `y` are absent, this is interpreted as wide-form. Otherwise it is expected to be long-form.
> 用于绘图的数据集。如果`x`和`y`都缺失,那么数据将被视为宽格式。否则数据被视为长格式。
`order, hue_order`lists of strings, optional
`order, hue_order`字符串列表,可选
> Order to plot the categorical levels in, otherwise the levels are inferred from the data objects.
> 控制分类变量(对应的条形图)的绘制顺序,若缺失则从数据中推断分类变量的顺序。
`orient`:“v” | “h”, optional
`orient`:“v” | “h”,可选
> Orientation of the plot (vertical or horizontal). This is usually inferred from the dtype of the input variables, but can be used to specify when the “categorical” variable is a numeric or when plotting wide-form data.
> 控制绘图的方向(垂直或水平)。这通常是从输入变量的dtype推断出来的,但是当“分类”变量为数值型或绘制宽格式数据时可用于指定绘图的方向。
`color`:matplotlib color, optional
`color`:matplotlib颜色,可选
> Color for all of the elements, or seed for a gradient palette.
> 所有元素的颜色,或渐变调色板的种子颜色。
`palette`palette name, list, or dict, optional
`palette`调色板名称,列表或字典,可选
> Colors to use for the different levels of the `hue` variable. Should be something that can be interpreted by [`color_palette()`](seaborn.color_palette.html#seaborn.color_palette "seaborn.color_palette"), or a dictionary mapping hue levels to matplotlib colors.
> 用于`hue`变量的不同级别的颜色。可以从 [`color_palette()`](seaborn.color_palette.html#seaborn.color_palette "seaborn.color_palette") 得到一些解释,或者将色调级别映射到matplotlib颜色的字典。
`saturation`:float, optional
`saturation`:float,可选
> Proportion of the original saturation to draw colors at. Large patches often look better with slightly desaturated colors, but set this to `1` if you want the plot colors to perfectly match the input color spec.
> 控制用于绘制颜色的原始饱和度的比例。通常大幅填充在轻微不饱和的颜色下看起来更好,如果您希望绘图颜色与输入颜色规格完美匹配可将其设置为`1`。
`width`:float, optional
`width`:float,可选
> Width of a full element when not using hue nesting, or width of all the elements for one level of the major grouping variable.
> 不使用色调嵌套时完整元素的宽度,或主要分组变量一个级别的所有元素的宽度。
`dodge`:bool, optional
`dodge`:bool,可选
> When hue nesting is used, whether elements should be shifted along the categorical axis.
> 使用色调嵌套时,元素是否应沿分类轴移动。
`k_depth`:“proportion” | “tukey” | “trustworthy”, optional
`k_depth`:“proportion” | “tukey” | “trustworthy”,可选
> The number of boxes, and by extension number of percentiles, to draw. All methods are detailed in Wickham’s paper. Each makes different assumptions about the number of outliers and leverages different statistical properties.
> 通过增大百分比的粒度控制绘制的盒形图数目。所有方法都在Wickham的论文中有详细描述。每个参数代表利用不同的统计特性对异常值的数量做出不同的假设。
`linewidth`:float, optional
`linewidth`:float,可选
> Width of the gray lines that frame the plot elements.
> 构图元素的灰线宽度。
`scale`:“linear” | “exponential” | “area”
> Method to use for the width of the letter value boxes. All give similar results visually. “linear” reduces the width by a constant linear factor, “exponential” uses the proportion of data not covered, “area” is proportional to the percentage of data covered.
> 用于控制增强箱型图宽度的方法。所有参数都会给显示效果造成影响。 “linear” 通过恒定的线性因子减小宽度,“exponential” 使用未覆盖的数据的比例调整宽度, “area” 与所覆盖的数据的百分比成比例。
`outlier_prop`:float, optional
`outlier_prop`:float,可选
> Proportion of data believed to be outliers. Used in conjunction with k_depth to determine the number of percentiles to draw. Defaults to 0.007 as a proportion of outliers. Should be in range [0, 1].
> 被认为是异常值的数据比例。与 `k_depth` 结合使用以确定要绘制的百分位数。默认值为0.007作为异常值的比例。该参数取值应在[0,1]范围内。
`ax`:matplotlib Axes, optional
`ax`:matplotlib轴,可选
> Axes object to draw the plot onto, otherwise uses the current Axes.
> 绘图时使用的Axes轴对象,否则使用当前Axes轴对象。
`kwargs`key, value mappings
`kwargs`键,值映射
> Other keyword arguments are passed through to `plt.plot` and `plt.scatter` at draw time.
> 其他在绘制时传递给`plt.plot`和`plt.scatter`参数。
返回值:`ax`:matplotlib Axes
返回值:`ax`:matplotlib
> Returns the Axes object with the plot drawn onto it.
> 返回Axes对轴象,并在其上绘制绘图。
See also
亦可参见
A combination of boxplot and kernel density estimation.A traditional box-and-whisker plot with a similar API.
boxplot和核密度估计的结合。一个传统的箱型图具有类似的API。
Examples
示例
Draw a single horizontal boxen plot:
绘制一个独立的横向增强箱型图:
```py
>>> import seaborn as sns
......@@ -108,7 +108,7 @@ Draw a single horizontal boxen plot:
![http://seaborn.pydata.org/_images/seaborn-boxenplot-1.png](img/ea7362d005109093ddfe7d7a0039a13e.jpg)
Draw a vertical boxen plot grouped by a categorical variable:
根据分类变量分组绘制一个纵向的增强箱型图:
```py
>>> ax = sns.boxenplot(x="day", y="total_bill", data=tips)
......@@ -117,7 +117,7 @@ Draw a vertical boxen plot grouped by a categorical variable:
![http://seaborn.pydata.org/_images/seaborn-boxenplot-2.png](img/31c79f0cf22d453e10799da960e3e801.jpg)
Draw a letter value plot with nested grouping by two categorical variables:
根据2个分类变量嵌套分组绘制一个增强箱型图:
```py
>>> ax = sns.boxenplot(x="day", y="total_bill", hue="smoker",
......@@ -127,7 +127,7 @@ Draw a letter value plot with nested grouping by two categorical variables:
![http://seaborn.pydata.org/_images/seaborn-boxenplot-3.png](img/1db91ed8446afc825fa5bba21f1ef278.jpg)
Draw a boxen plot with nested grouping when some bins are empty:
当一些数据为空时根据嵌套分组绘制一个增强箱型图:
```py
>>> ax = sns.boxenplot(x="day", y="total_bill", hue="time",
......@@ -137,7 +137,7 @@ Draw a boxen plot with nested grouping when some bins are empty:
![http://seaborn.pydata.org/_images/seaborn-boxenplot-4.png](img/2e57af8b26439c244046ff7846601335.jpg)
Control box order by passing an explicit order:
通过显式传入参数指定顺序控制箱型图的显示顺序:
```py
>>> ax = sns.boxenplot(x="time", y="tip", data=tips,
......@@ -147,7 +147,7 @@ Control box order by passing an explicit order:
![http://seaborn.pydata.org/_images/seaborn-boxenplot-5.png](img/e8fa81696195ce058546e429317075bc.jpg)
Draw a boxen plot for each numeric variable in a DataFrame:
针对DataFrame里每一个数值型变量绘制增强箱型图:
```py
>>> iris = sns.load_dataset("iris")
......@@ -157,7 +157,7 @@ Draw a boxen plot for each numeric variable in a DataFrame:
![http://seaborn.pydata.org/_images/seaborn-boxenplot-6.png](img/a9e939280daed8ec0712c8e6e6be78fb.jpg)
Use [`stripplot()`](seaborn.stripplot.html#seaborn.stripplot "seaborn.stripplot") to show the datapoints on top of the boxes:
使用 [`stripplot()`](seaborn.stripplot.html#seaborn.stripplot "seaborn.stripplot") 显示箱型图顶部的数据点:
```py
>>> ax = sns.boxenplot(x="day", y="total_bill", data=tips)
......@@ -168,7 +168,7 @@ Use [`stripplot()`](seaborn.stripplot.html#seaborn.stripplot "seaborn.stripplot"
![http://seaborn.pydata.org/_images/seaborn-boxenplot-7.png](img/fb3de8051b91bb0be2143717f96c0a7c.jpg)
Use [`catplot()`](seaborn.catplot.html#seaborn.catplot "seaborn.catplot") to combine [`boxenplot()`](#seaborn.boxenplot "seaborn.boxenplot") and a [`FacetGrid`](seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid"). This allows grouping within additional categorical variables. Using [`catplot()`](seaborn.catplot.html#seaborn.catplot "seaborn.catplot") is safer than using [`FacetGrid`](seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid") directly, as it ensures synchronization of variable order across facets:
[`catplot()`](seaborn.catplot.html#seaborn.catplot "seaborn.catplot") to combine [`boxenplot()`](#seaborn.boxenplot "seaborn.boxenplot") 以及 [`FacetGrid`](seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid") 结合起来使用。这允许您通过额外的分类变量进行分组。使用 [`catplot()`](seaborn.catplot.html#seaborn.catplot "seaborn.catplot") 比直接使用 [`FacetGrid`](seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid") 更为安全,因为它保证了不同切面上变量同步的顺序:
```py
>>> g = sns.catplot(x="sex", y="total_bill",
......
......@@ -4,113 +4,113 @@
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, errwidth=None, capsize=None, ax=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:
输入数据可以通过多种格式传入,包括:
* Vectors of data represented as lists, numpy arrays, or pandas Series objects passed directly to the `x`, `y`, and/or `hue` parameters.
* A “long-form” DataFrame, in which case the `x`, `y`, and `hue` variables will determine how the data are plotted.
* A “wide-form” DataFrame, such that each numeric column will be plotted.
* An array or list of vectors.
* 格式为列表,numpy数组或pandas Series对象的数据向量可以直接传递给`x``y``hue`参数。
* 对于长格式的DataFrame,`x``y`,和`hue`参数会决定如何绘制数据。
* 对于宽格式的DataFrame,每一列数值列都会被绘制。
* 一个数组或向量的列表。
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.
在大多数情况下,可以使用numpy或Python对象,但更推荐使用pandas对象,因为与数据关联的列名/行名可以用于标注横轴/纵轴的名称。此外,您可以使用分类类型对变量进行分组以控制绘图元素的顺序。
This function always treats one of the variables as categorical and draws data at ordinal positions (0, 1, … n) on the relevant axis, even when the data has a numeric or date type.
此函数始终将其中一个变量视为分类,并在相关轴上的序数位置(0,1,... n)处绘制数据,即使数据属于数值类型或日期类型也是如此。
See the [tutorial](../tutorial/categorical.html#categorical-tutorial) for more information.
更多信息请参阅 [教程](../tutorial/categorical.html#categorical-tutorial)
参数:`x, y, hue`names of variables in `data` or vector data, optional
参数:`x, y, hue``data`或向量数据中的变量名称,可选
> Inputs for plotting long-form data. See examples for interpretation.
> 用于绘制长格式数据的输入。查看样例以进一步理解。
`data`:DataFrame, array, or list of arrays, optional
`data`:DataFrame,数组,数组列表,可选
> Dataset for plotting. If `x` and `y` are absent, this is interpreted as wide-form. Otherwise it is expected to be long-form.
> 于绘图的数据集。如果`x`和`y`都缺失,那么数据将被视为宽格式。否则数据被视为长格式。
`order, hue_order`lists of strings, optional
`order, hue_order`字符串列表,可选
> Order to plot the categorical levels in, otherwise the levels are inferred from the data objects.
> 控制绘图的方向(垂直或水平)。这通常是从输入变量的dtype推断出来的,但是当“分类”变量为数值型或绘制宽格式数据时可用于指定绘图的方向。
`estimator`callable that maps vector -&gt; scalar, optional
`estimator`调用函数实现向量 -&gt; 标量的映射,可选
> Statistical function to estimate within each categorical bin.
> 在每个分箱内进行估计的统计函数。
`ci`:float or “sd” or None, optional
`ci`:float 或 “sd” 或 None,可选
> Size of confidence intervals to draw around estimated values. If “sd”, skip bootstrapping and draw the standard deviation of the observations. If `None`, no bootstrapping will be performed, and error bars will not be drawn.
> 在估计值附近绘制置信区间的尺寸大小。如果是“sd”,则跳过引导阶段并绘制观察数据点的标准差。如果为 `None`,则不会执行引导过程,并且不会绘制误差块。
`n_boot`:int, optional
`n_boot`:int,可选
> Number of bootstrap iterations to use when computing confidence intervals.
> 计算置信区间时使用的引导迭代次数。
`units`name of variable in `data` or vector data, optional
`units``data` 或vector data中变量的名称,可选
> Identifier of sampling units, which will be used to perform a multilevel bootstrap and account for repeated measures design.
> 采样单元的标识符,用于执行多级引导过程(计算置信区间等)并能够处理重复测量的设定。
`markers`string or list of strings, optional
`markers`字符串或字符串列表,可选
> Markers to use for each of the `hue` levels.
> 用于每个`hue`色调的级别的标记。
`linestyles`string or list of strings, optional
`linestyles`字符串或字符串列表,可选
> Line styles to use for each of the `hue` levels.
> 用于每个`hue`色调的级别的线条风格。
`dodge`:bool or float, optional
`dodge`:bool或float,可选
> Amount to separate the points for each level of the `hue` variable along the categorical axis.
> 用于沿着分类轴分离`hue`变量的每个级别数据点的数量。
`join`:bool, optional
`join`:bool,可选
> If `True`, lines will be drawn between point estimates at the same `hue` level.
> 如果为`True`,则在`hue`级别相同的点估计值之间绘制线条。
`scale`:float, optional
`scale`:float,可选
> Scale factor for the plot elements.
> 绘图元素的比例因子。
`orient`:“v” &#124; “h”, optional
`orient`:“v” &#124; “h”,可选
> Orientation of the plot (vertical or horizontal). This is usually inferred from the dtype of the input variables, but can be used to specify when the “categorical” variable is a numeric or when plotting wide-form data.
> 控制绘图的方向(垂直或水平)。这通常是从输入变量的dtype推断出来的,但是当“分类”变量为数值型或绘制宽格式数据时可用于指定绘图的方向。
`color`:matplotlib color, optional
`color`:matplotlib颜色,可选
> Color for all of the elements, or seed for a gradient palette.
> 所有元素的颜色,或渐变调色板的种子颜色。
`palette`palette name, list, or dict, optional
`palette`调色板名称,列表或字典,可选
> Colors to use for the different levels of the `hue` variable. Should be something that can be interpreted by [`color_palette()`](seaborn.color_palette.html#seaborn.color_palette "seaborn.color_palette"), or a dictionary mapping hue levels to matplotlib colors.
> 用于`hue`变量的不同级别的颜色。可以从 [`color_palette()`](seaborn.color_palette.html#seaborn.color_palette "seaborn.color_palette") 得到一些解释,或者将色调级别映射到matplotlib颜色的字典。
`errwidth`:float, optional
`errwidth`:float,可选
> Thickness of error bar lines (and caps).
> 误差线(和上下限指示线)的厚度。
`capsize`:float, optional
`capsize`:float,可选
> Width of the “caps” on error bars.
> 误差线“上下限指示线”的宽度。
`ax`:matplotlib Axes, optional
`ax`:matplotlib轴,可选
> Axes object to draw the plot onto, otherwise uses the current Axes.
> 绘图时使用的Axes轴对象,否则使用当前Axes轴对象。
返回值:`ax`:matplotlib Axes
返回值:`ax`:matplotlib
> Returns the Axes object with the plot drawn onto it.
> 返回Axes对轴象,并在其上绘制绘图。
See also
亦可参见
Show point estimates and confidence intervals using bars.Combine a categorical plot with a class:<cite>FacetGrid</cite>.
使用线条显示数据点的估计值和置信区间。将分类类别的绘图与该类结合使用:<cite>FacetGrid</cite>
Examples
示例
Draw a set of vertical point plots grouped by a categorical variable:
绘制一组按分类变量分组的纵向点图:
```py
>>> import seaborn as sns
......@@ -122,7 +122,7 @@ Draw a set of vertical point plots grouped by a categorical variable:
![http://seaborn.pydata.org/_images/seaborn-pointplot-1.png](img/f5eb9519edb052868537ca9735f0f8df.jpg)
Draw a set of vertical points with nested grouping by a two variables:
通过两个嵌套分组的变量绘制一组纵向的点图:
```py
>>> ax = sns.pointplot(x="time", y="total_bill", hue="smoker",
......@@ -132,7 +132,7 @@ Draw a set of vertical points with nested grouping by a two variables:
![http://seaborn.pydata.org/_images/seaborn-pointplot-2.png](img/864eda3b3c2fcc6b0bdb53c84c3dafcf.jpg)
Separate the points for different hue levels along the categorical axis:
沿着分类轴分离不同色调级别的点:
```py
>>> ax = sns.pointplot(x="time", y="total_bill", hue="smoker",
......@@ -142,7 +142,7 @@ Separate the points for different hue levels along the categorical axis:
![http://seaborn.pydata.org/_images/seaborn-pointplot-3.png](img/b7f6772294dcf0d9b7035314c114c54b.jpg)
Use a different marker and line style for the hue levels:
根据色调级别使用不同的标记和线条样式:
```py
>>> ax = sns.pointplot(x="time", y="total_bill", hue="smoker",
......@@ -154,7 +154,7 @@ Use a different marker and line style for the hue levels:
![http://seaborn.pydata.org/_images/seaborn-pointplot-4.png](img/a97ae4389fc8bc946eb62e06c173b3e3.jpg)
Draw a set of horizontal points:
绘制一组横向的点图:
```py
>>> ax = sns.pointplot(x="tip", y="day", data=tips)
......@@ -163,7 +163,7 @@ Draw a set of horizontal points:
![http://seaborn.pydata.org/_images/seaborn-pointplot-5.png](img/4217fbfe6aaba42c4d18a69c5b8c9fc4.jpg)
Don’t draw a line connecting each point:
不要绘制每个点的连接线:
```py
>>> ax = sns.pointplot(x="tip", y="day", data=tips, join=False)
......@@ -172,7 +172,7 @@ Don’t draw a line connecting each point:
![http://seaborn.pydata.org/_images/seaborn-pointplot-6.png](img/96a33f32e85dcced62c9fc4ff063fe3d.jpg)
Use a different color for a single-layer plot:
对单层图使用不同的颜色:
```py
>>> ax = sns.pointplot("time", y="total_bill", data=tips,
......@@ -182,7 +182,7 @@ Use a different color for a single-layer plot:
![http://seaborn.pydata.org/_images/seaborn-pointplot-7.png](img/1e3348f06e5cd7876d5bc530b04d3d93.jpg)
Use a different color palette for the points:
为数据点使用不同的调色板:
```py
>>> ax = sns.pointplot(x="time", y="total_bill", hue="smoker",
......@@ -192,7 +192,7 @@ Use a different color palette for the points:
![http://seaborn.pydata.org/_images/seaborn-pointplot-8.png](img/d4a4eeea79c55b0ae9d3088746b6503a.jpg)
Control point order by passing an explicit order:
通过显式传入参数指定顺序控制点的显示顺序:
```py
>>> ax = sns.pointplot(x="time", y="tip", data=tips,
......@@ -202,7 +202,7 @@ Control point order by passing an explicit order:
![http://seaborn.pydata.org/_images/seaborn-pointplot-9.png](img/4c08e24283b6829b3d91e3c23de56923.jpg)
Use median as the estimate of central tendency:
用中位数作为集中趋势的估计:
```py
>>> from numpy import median
......@@ -212,7 +212,7 @@ Use median as the estimate of central tendency:
![http://seaborn.pydata.org/_images/seaborn-pointplot-10.png](img/0ec9398faa407996527db66db46c71f2.jpg)
Show the standard error of the mean with the error bars:
用误差线显示均值的标准误差:
```py
>>> ax = sns.pointplot(x="day", y="tip", data=tips, ci=68)
......@@ -221,7 +221,7 @@ Show the standard error of the mean with the error bars:
![http://seaborn.pydata.org/_images/seaborn-pointplot-11.png](img/f9f6dd93a512624527b38dcc26d97e37.jpg)
Show standard deviation of observations instead of a confidence interval:
显示观测值的标准偏差而不是置信区间:
```py
>>> ax = sns.pointplot(x="day", y="tip", data=tips, ci="sd")
......@@ -230,7 +230,7 @@ Show standard deviation of observations instead of a confidence interval:
![http://seaborn.pydata.org/_images/seaborn-pointplot-12.png](img/f41526e37f8f11614ea339da0e242c51.jpg)
Add “caps” to the error bars:
将“上下限指示线”增加到误差线的顶部和底部:
```py
>>> ax = sns.pointplot(x="day", y="tip", data=tips, capsize=.2)
......@@ -239,7 +239,7 @@ Add “caps” to the error bars:
![http://seaborn.pydata.org/_images/seaborn-pointplot-13.png](img/b7df4cf62c681ea39bd145bdb740bc81.jpg)
Use [`catplot()`](seaborn.catplot.html#seaborn.catplot "seaborn.catplot") to combine a [`barplot()`](seaborn.barplot.html#seaborn.barplot "seaborn.barplot") and a [`FacetGrid`](seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid"). This allows grouping within additional categorical variables. Using [`catplot()`](seaborn.catplot.html#seaborn.catplot "seaborn.catplot") is safer than using [`FacetGrid`](seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid") directly, as it ensures synchronization of variable order across facets:
[`catplot()`](seaborn.catplot.html#seaborn.catplot "seaborn.catplot")[`barplot()`](seaborn.barplot.html#seaborn.barplot "seaborn.barplot") 以及 [`FacetGrid`](seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid")结合使用。这允许您通过额外的分类变量进行分组。使用 [`catplot()`](seaborn.catplot.html#seaborn.catplot "seaborn.catplot") 比直接使用 [`FacetGrid`](seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid") 更为安全,因为它保证了不同切面上变量同步的顺序:
```py
>>> g = sns.catplot(x="sex", y="total_bill",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册