seaborn.jointplot

    This function provides a convenient interface to the class, with several canned plot kinds. This is intended to be a fairly lightweight wrapper; if you need more flexibility, you should use JointGrid directly.

    参数:x, y:strings or vectors

    data:DataFrame, optional

    DataFrame when x and y are variable names.

    kind:{ “scatter” | “reg” | “resid” | “kde” | “hex” }, optional

    Kind of plot to draw.

    stat_func:callable or None, optional

    Deprecated

    color:matplotlib color, optional

    height:numeric, optional

    Size of the figure (it will be square).

    ratio:numeric, optional

    space:numeric, optional

    Space between the joint and marginal axes

    :bool, optional

    {x, y}lim:two-tuples, optional

    Axis limits to set before plotting.

    {joint, marginal, annot}_kws:dicts, optional

    Additional keyword arguments for the plot components.

    kwargs:key, value pairings

    Additional keyword arguments are passed to the function used to draw the plot on the joint Axes, superseding items in the joint_kws dictionary.

    返回值:grid

    See also

    The Grid class used for drawing this plot. Use it directly if you need more flexibility.

    Draw a scatterplot with marginal histograms:

    1. >>> import numpy as np, pandas as pd; np.random.seed(0)
    2. >>> import seaborn as sns; sns.set(style="white", color_codes=True)
    3. >>> tips = sns.load_dataset("tips")

    Add regression and kernel density fits:

    1. >>> g = sns.jointplot("total_bill", "tip", data=tips, kind="reg")

    http://seaborn.pydata.org/_images/seaborn-jointplot-2.png

    Replace the scatterplot with a joint histogram using hexagonal bins:

    Replace the scatterplots and histograms with density estimates and align the marginal Axes tightly with the joint Axes:

    1. >>> g = sns.jointplot("sepal_width", "petal_length", data=iris,
    2. ... kind="kde", space=0, color="g")

    http://seaborn.pydata.org/_images/seaborn-jointplot-4.png

    Draw a scatterplot, then add a joint density estimate:

    1. >>> g = (sns.jointplot("sepal_length", "sepal_width",
    2. ... data=iris, color="k")
    3. ... .plot_joint(sns.kdeplot, zorder=0, n_levels=6))

    Pass vectors in directly without using Pandas, then name the axes:

    http://seaborn.pydata.org/_images/seaborn-jointplot-6.png

    Draw a smaller figure with more space devoted to the marginal plots:

    1. ... height=5, ratio=3, color="g")

    1. >>> g = sns.jointplot("petal_length", "sepal_length", data=iris,
    2. ... marginal_kws=dict(bins=15, rug=True),
    3. ... annot_kws=dict(stat="r"),

    http://seaborn.pydata.org/_images/seaborn-jointplot-8.png