提交 177547b0 编写于 作者: S Stuming

Update 10.md

上级 40a05fa1
# seaborn.relplot # seaborn.relplot
> 译者:[Stuming](https://github.com/Stuming)
```py ```py
seaborn.relplot(x=None, y=None, hue=None, size=None, style=None, data=None, row=None, col=None, col_wrap=None, row_order=None, col_order=None, palette=None, hue_order=None, hue_norm=None, sizes=None, size_order=None, size_norm=None, markers=None, dashes=None, style_order=None, legend='brief', kind='scatter', height=5, aspect=1, facet_kws=None, **kwargs) seaborn.relplot(x=None, y=None, hue=None, size=None, style=None, data=None, row=None, col=None, col_wrap=None, row_order=None, col_order=None, palette=None, hue_order=None, hue_norm=None, sizes=None, size_order=None, size_norm=None, markers=None, dashes=None, style_order=None, legend='brief', kind='scatter', height=5, aspect=1, facet_kws=None, **kwargs)
``` ```
Figure-level interface for drawing relational plots onto a FacetGrid. 绘制相关关系图像到FacetGrid的图像级别接口。
This function provides access to several different axes-level functions that show the relationship between two variables with semantic mappings of subsets. The `kind` parameter selects the underlying axes-level function to use:
* [`scatterplot()`](seaborn.scatterplot.html#seaborn.scatterplot "seaborn.scatterplot") (with `kind="scatter"`; the default) 此函数提供对一些不同轴级别函数的访问,这些函数通过子集的语义映射显示两个变量之间的关系。`kind`参数选择要使用的基础轴级函数:
* [`lineplot()`](seaborn.lineplot.html#seaborn.lineplot "seaborn.lineplot") (with `kind="line"`) * [`scatterplot()`](seaborn.scatterplot.html#seaborn.scatterplot "seaborn.scatterplot") (通过`kind="scatter"`访问;默认为此)
* [`lineplot()`](seaborn.lineplot.html#seaborn.lineplot "seaborn.lineplot") (通过`kind="line"`访问)
Extra keyword arguments are passed to the underlying function, so you should refer to the documentation for each to see kind-specific options. 额外的关键字参数会被传递给隐含的函数,因此使用时应当参考对应函数的文档去了解各种选项。
The relationship between `x` and `y` can be shown for different subsets of the data using the `hue`, `size`, and `style` parameters. These parameters control what visual semantics are used to identify the different subsets. It is possible to show up to three dimensions independently by using all three semantic types, but this style of plot can be hard to interpret and is often ineffective. Using redundant semantics (i.e. both `hue` and `style` for the same variable) can be helpful for making graphics more accessible. 对于数据不同子集的`x``y`的绘制关系可以通过`hue`, `size`以及`style`参数控制。这些参数控制使用哪些视觉语义来区分不同的子集。使用所有三个语义类型可以独立展示三个维度,但是这种方式得到的绘制结果难以被理解而且低效。使用多种语义(例如对相同变量同时使用`hue``style`)可以使图像更加易懂。
See the [tutorial](../tutorial/relational.html#relational-tutorial) for more information. 参考[tutorial](../tutorial/relational.html#relational-tutorial)获得更多信息。
After plotting, the [`FacetGrid`](seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid") with the plot is returned and can be used directly to tweak supporting plot details or add other layers. 绘制后,会返回带有图像的[`FacetGrid`](seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid"),随后可以直接进行图像细节调节或者加入其他图层。
Note that, unlike when using the underlying plotting functions directly, data must be passed in a long-form DataFrame with variables specified by passing strings to `x`, `y`, and other parameters. 值得注意的是,与直接使用隐含函数的方式不同,数据必须以长格式的DataFrame传入,同时变量通过`x`, `y`及其他参数指定。
参数:`x, y`names of variables in `data` 参数:`x, y``data`中的变量名
> Input data variables; must be numeric. > 输入数据的变量;数据必须为数值型。
`hue`:name in `data`, optional `hue`: `data`中的名称,可选
> Grouping variable that will produce elements with different colors. Can be either categorical or numeric, although color mapping will behave differently in latter case. > 将会产生具有不同颜色的元素的变量进行分组。这些变量可以是类别变量或者数值型变量,尽管颜色映射在后面的情况中会有不同的表现。
`size`name in `data`, optional `size``data`中的名称,可选
> Grouping variable that will produce elements with different sizes. Can be either categorical or numeric, although size mapping will behave differently in latter case. > 将会产生具有不同尺寸的元素的变量进行分组。这些变量可以是类别变量或者数值型变量,尽管尺寸映射在后面的情况中会有不同的表现。
`style`:name in `data`, optional `style`:name in `data`, optional
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册