Figure-level interface for drawing relational plots onto a 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:
绘制相关关系图像到FacetGrid的图像级别接口。
*[`scatterplot()`](seaborn.scatterplot.html#seaborn.scatterplot"seaborn.scatterplot")(with`kind="scatter"`; the default)
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.
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.
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.
> Grouping variable that will produce elements with different colors. Can be either categorical or numeric, although color mapping will behave differently in latter case.
> Grouping variable that will produce elements with different sizes. Can be either categorical or numeric, although size mapping will behave differently in latter case.
> Grouping variable that will produce elements with different styles. Can have a numeric dtype but will always be treated as categorical.
> 将会产生具有不同风格的元素的变量进行分组。这些变量可以为数值型,但是通常会被当做类别变量处理。
`data`:DataFrame
> Tidy (“long-form”) dataframe where each column is a variable and each row is an observation.
> 长格式的DataFrame,每列是一个变量,每行是一个观察值。
`row, col`:names of variables in `data`, optional
`row, col`:`data`中的变量名,可选
> Categorical variables that will determine the faceting of the grid.
> 确定网格的分面的类别变量。
`col_wrap`:int, optional
`col_wrap`:int, 可选
> “Wrap” the column variable at this width, so that the column facets span multiple rows. Incompatible with a `row` facet.
> 以此宽度“包裹”列变量,以便列分面跨越多行。与`row`分面不兼容。
`row_order, col_order`:lists of strings, optional
`row_order, col_order`:字符串列表,可选
> Order to organize the rows and/or columns of the grid in, otherwise the orders are inferred from the data objects.
> 以此顺序组织网格的行和/或列,否则顺序将从数据对象中推断。
`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.
> Specified order for the appearance of the `hue` variable levels, otherwise they are determined from the data. Not relevant when the `hue` variable is numeric.
> 指定`hue`变量层级出现的顺序,否则会根据数据确定。当`hue`变量为数值型时与此无关。
`hue_norm`:tuple or Normalize object, optional
`hue_norm`:元组或者Normalize对象,可选
> Normalization in data units for colormap applied to the `hue` variable when it is numeric. Not relevant if it is categorical.
> An object that determines how sizes are chosen when `size` is used. It can always be a list of size values or a dict mapping levels of the `size` variable to sizes. When `size` is numeric, it can also be a tuple specifying the minimum and maximum size to use such that other values are normalized within this range.
> Specified order for appearance of the `size` variable levels, otherwise they are determined from the data. Not relevant when the `size` variable is numeric.
> Normalization in data units for scaling plot objects when the `size` variable is numeric.
> 当`size`变量为数值型时,用于数据单元的scaling plot对象的标准化。
`legend`:“brief”, “full”, or False, optional
`legend`:“brief”, “full”, 或者False, 可选
> How to draw the legend. If “brief”, numeric `hue` and `size` variables will be represented with a sample of evenly spaced values. If “full”, every group will get an entry in the legend. If `False`, no legend data is added and no legend is drawn.