<jupyter_start><jupyter_text>二维关系图与一维分布组合图<jupyter_code>tips = sns.load_dataset("tips")
tips
df = pd.DataFrame({
    "x": tips["total_bill"],
    "y": tips["tip"]
})
df<jupyter_output><empty_output><jupyter_text>二维散点与统计直方图<jupyter_code>sns_reg = sns.jointplot(x = "x", 
                        y = "y",
                        data = df,
                        color = "#D31A8A",
                        kind = "scatter",
                        space = 0,
                        height = 5, 
                        ratio = 5,
                        marginal_kws = {"bins": 20, "rug": False, "hist_kws": {"edgecolor": "k", "color": "#7CBC47", "alpha": 1}}
)
sns_reg.set_axis_labels(xlabel = "total bill", ylabel = "tip");<jupyter_output><empty_output><jupyter_text>带趋势线的二维散点与统计直方图<jupyter_code>sns_reg = sns.jointplot(x = "x", 
                        y = "y",
                        data = df,
                        color = "#7CBC47",
                        kind = "reg",
                        space = 0,
                        height = 5, 
                        ratio = 5,
                        scatter_kws = {"color": "#7CBC47", "alpha": 0.7, "s": 30, "marker": "o"},
                        line_kws = {"color": "#D31A8A", "alpha": 1, "lw": 4},
                        marginal_kws = {"bins": 20, "rug": False, "hist_kws": {"edgecolor": "k", "color": "#7CBC47", "alpha": 1}}
)
sns_reg.set_axis_labels(xlabel = "total bill", ylabel = "tip");<jupyter_output><empty_output><jupyter_text>二维与一维统计直方图<jupyter_code>sns_hex = sns.jointplot(x = "x", 
                        y = "y",
                        data = df,
                        color = "#D31A8A",
                        linewidth = 0.1,
                        kind = "hex",
                        space = 0,
                        height = 5, 
                        ratio = 5,
                        xlim = (0, 60),
                        joint_kws = {"gridsize": 20, "edgecolor": "w"},
                        marginal_kws = {"bins": 20, "rug": False, "hist_kws": {"edgecolor": "k", "color": "#D31A8A", "alpha": 1}}
)
sns_hex.set_axis_labels(xlabel = "total bill", ylabel = "tip");<jupyter_output><empty_output><jupyter_text>二维与一维核密度估计图<jupyter_code>sns_kde = sns.jointplot(x = "x", 
                        y = "y",
                        data = df,
                        color = "#D31A8A",
                        kind = "kde",
                        space = 0
)
sns_kde.plot_joint(plt.scatter, c = "k", s = 10, linewidth = 1, marker = "+")
sns_kde.set_axis_labels(xlabel = "total bill", ylabel = "tip");<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15282012195121952, 'fraction_numerical': 0.023628048780487805, 'mean_word_length': 1.4601686972820993, 'pattern_counts': {'":': 29, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '457943', 'license': 'MIT', 'n_tokens_mistral': 968, 'n_tokens_neox': 904, 'n_words': 160, 'path': 'utils/data_visual/py_charts/correlation_distribution.ipynb', 'repo_name': 'wangzhefeng/data-analysis', 'size': '2624'}