From 67560e2ccab6bba91bfdb3729d66ba0d69d57d62 Mon Sep 17 00:00:00 2001 From: GKcmdr Date: Tue, 23 Apr 2019 22:00:00 +0800 Subject: [PATCH] Update 20.md --- docs/20.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/20.md b/docs/20.md index f2edec9..cde11ed 100644 --- a/docs/20.md +++ b/docs/20.md @@ -15,13 +15,14 @@ seaborn.barplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, 输入数据的格式可以不同,包括: * 以列表,numpy array或者pandas中的Series object 表示的向量。这些向量可以直接传入 `x`, `y`, 以及 `hue` 参数。 -* “long-form” DataFrame, 即x值,y值和色相变量决定了数据是如何绘制的。 -* “wide” DataFrame,每个列的数值都会被绘制出来. +* 长表, x值,y值和色相变量决定了数据是如何绘制的。 +* 宽表,每个列的数值都会被绘制出来. * 数组或者列表的向量。 大多数情况下,您可以使用numpy的对象或者python的对象,但是用pandas对象更好,因为相关的but pandas objects are preferable because the associated names will be used to annotate the axes. 另外,为了控制绘图元素 您也可以可以用分类类型来组合不同的变量。 -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. +这个函数始终把一个变量当做分类变量,即使这个数据是数值类型或者日期类型,并且按照序数顺序绘制在相关的轴上。 + 详情请看[教程](../tutorial/categorical.html#categorical-tutorial)。 @@ -47,7 +48,7 @@ This function always treats one of the variables as categorical and draws data a **n_boot** : int, optional -> Number of bootstrap iterations to use when computing confidence intervals. +> 计算置信区间需要的Boostrap迭代次数。 **units** : name of variable in `data` or vector data, optional @@ -75,7 +76,7 @@ This function always treats one of the variables as categorical and draws data a **errwidth** : float, optional -> Thickness of error bar lines (and caps). +> 错误条的线的厚度。 **capsize** : float, optional @@ -87,7 +88,7 @@ This function always treats one of the variables as categorical and draws data a **ax** : matplotlib Axes, optional -> Axes object to draw the plot onto, otherwise uses the current Axes. +> 指定一个Axes用于绘图,如果不指定,则使用当前的Axes。 **kwargs** : key, value mappings @@ -129,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) -Draw a set of horizontal bars: +绘制一组水平柱状图: ```py >>> ax = sns.barplot(x="tip", y="day", data=tips) @@ -185,7 +186,7 @@ Add “caps” to the error bars: ![http://seaborn.pydata.org/_images/seaborn-barplot-8.png](img/5a69e1058d9b8b4b5be6dc15d1bad130.jpg) -使用一个不同的颜色条: +使用一个不同的调色盘来绘制图案: ```py >>> ax = sns.barplot("size", y="total_bill", data=tips, -- GitLab