未验证 提交 edbdc557 编写于 作者: G GKcmdr 提交者: GitHub

Update 20.md

上级 f3e6684f
......@@ -19,32 +19,32 @@ seaborn.barplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None,
* 宽表,每个列的数值都会被绘制出来.
* 数组或者列表的向量。
大多数情况下,您可以使用numpy的对象或者python的对象,但是用pandas对象更好,因为相关的but pandas objects are preferable because the associated names will be used to annotate the axes. 另外,为了控制绘图元素 您也可以可以用分类类型来组合不同的变量。
大多数情况下,您可以使用numpy的对象或者python的对象,但是用pandas对象更好,因为相关的列名会被标注在图标上。 另外,为了控制绘图元素 您也可以可以用分类类型来组合不同的变量。
这个函数始终把一个变量当做分类变量,即使这个数据是数值类型或者日期类型,并且按照序数顺序绘制在相关的轴上。
详情请看[教程](../tutorial/categorical.html#categorical-tutorial)
| Parameters: | **x, y, hue** : names of variables in `data` or vector data, optional
| Parameters: | **x, y, hue** : `data` 中的变量名词或者向量, optional
> 用于绘制long-form数据的变量名称.
**data** : DataFrame, array, or list of arrays, optional
**data** : DataFrame, 数组, 数组列表, optional
> 用于绘图的数据集。如果缺失X值和Y值, 这个数据集会被解释成wide-form,否则this is interpreted as wide-form. Otherwise it is expected to be long-form.
> 用于绘图的数据集。如果数据集有x和y,数据集会被认为是long-form,否则会被认为是wide-form。
**order, hue_order** : lists of strings, optional
**order, hue_order** : 字符串列表, optional
> Order to plot the categorical levels in, otherwise the levels are inferred from the data objects.
> 绘制类别变量的顺序,如果没有,则从数据对象中推断绘图顺序。
**estimator** : callable that maps vector -> scalar, optional
**estimator** : 映射向量 -> 标量, optional
> Statistical function to estimate within each categorical bin.
> 统计函数用于估计每个分类纸条中的值。.
**ci** : float or “sd” or None, optional
> 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”(标准差),会跳过bootstrapping的过程,只绘制数据的标准差。 如果输入是的是`None`, 不会执行botstrapping,而且错误条也不会绘制。
**n_boot** : int, optional
......@@ -72,17 +72,17 @@ seaborn.barplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None,
**errcolor** : matplotlib color
> Color for the lines that represent the confidence interval.
> 表示置信区间的线的颜色。
**errwidth** : float, optional
> 错误条的线的厚度。
> 误差条的线的厚度。
**capsize** : float, optional
> 错误条端部的宽度。
> 误差条端部的宽度。
**dodge** : bool, optional
**dodge** : 布尔型, optional
> When hue nesting is used, whether elements should be shifted along the categorical axis.
......@@ -96,9 +96,9 @@ seaborn.barplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None,
|
| --- | --- |
| Returns: | **ax** : matplotlib Axes
| 返回值: | **ax** : matplotlib Axes
> Returns the Axes object with the plot drawn onto it.
> 返回有图表绘制的Axes对象。
|
| --- | --- |
......@@ -109,7 +109,7 @@ Show the counts of observations in each categorical bin.Show point estimates and
Examples
Draw a set of vertical bar plots grouped by a categorical variable:
绘制一组按类别变量分组的垂直条形图:
```py
>>> import seaborn as sns
......@@ -121,7 +121,7 @@ Draw a set of vertical bar plots grouped by a categorical variable:
![http://seaborn.pydata.org/_images/seaborn-barplot-1.png](img/9d1addc98b6a35ef0376219c56e7b7fd.jpg)
Draw a set of vertical bars with nested grouping by a two variables:
绘制一组由两个变量嵌套分组的垂直条形图:
```py
>>> ax = sns.barplot(x="day", y="total_bill", hue="sex", data=tips)
......@@ -130,7 +130,7 @@ Draw a set of vertical bars with nested grouping by a two variables:
![http://seaborn.pydata.org/_images/seaborn-barplot-2.png](img/863249efe2403afa4fae2f2b6884d3bd.jpg)
绘制一组水平柱状图:
绘制一组水平条形图:
```py
>>> ax = sns.barplot(x="tip", y="day", data=tips)
......@@ -159,7 +159,7 @@ Draw a set of vertical bars with nested grouping by a two variables:
![http://seaborn.pydata.org/_images/seaborn-barplot-5.png](img/2622373fb99932aa42e45c3b151135be.jpg)
Show the standard error of the mean with the error bars:
用误差条显示平均值的标准误差:
```py
>>> ax = sns.barplot(x="day", y="tip", data=tips, ci=68)
......@@ -177,7 +177,7 @@ Show the standard error of the mean with the error bars:
![http://seaborn.pydata.org/_images/seaborn-barplot-7.png](img/eeb77dac6d8f76d9f715476ce03773c5.jpg)
Add “caps” to the error bars:
给误差条增加“端点”:
```py
>>> ax = sns.barplot(x="day", y="tip", data=tips, capsize=.2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册