<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # seaborn.jointplot > 譯者:[Stuming](https://github.com/Stuming) ```py seaborn.jointplot(x, y, data=None, kind='scatter', stat_func=None, color=None, height=6, ratio=5, space=0.2, dropna=True, xlim=None, ylim=None, joint_kws=None, marginal_kws=None, annot_kws=None, **kwargs) ``` 繪制兩個變量的雙變量及單變量圖。 這個函數提供調用[`JointGrid`](seaborn.JointGrid.html#seaborn.JointGrid "seaborn.JointGrid")類的便捷接口,以及一些封裝好的繪圖類型。這是一個輕量級的封裝,如果需要更多的靈活性,應當直接使用[`JointGrid`](seaborn.JointGrid.html#seaborn.JointGrid "seaborn.JointGrid"). 參數:`x, y`:strings 或者 vectors > `data`中的數據或者變量名。 `data`:DataFrame, 可選 > 當`x`和`y`為變量名時的 DataFrame. `kind`:{ “scatter” &#124; “reg” &#124; “resid” &#124; “kde” &#124; “hex” }, 可選 > 繪制圖像的類型。 `stat_func`:可調用的,或者 None, 可選 > 已過時 `color`:matplotlib 顏色, 可選 > 用于繪制元素的顏色。 `height`:numeric, 可選 > 圖像的尺寸(方形)。 `ratio`:numeric, 可選 > 中心軸的高度與側邊軸高度的比例 `space`:numeric, 可選 > 中心和側邊軸的間隔大小 `dropna`:bool, 可選 > 如果為 True, 移除`x`和`y`中的缺失值。 `{x, y}lim`:two-tuples, 可選 > 繪制前設置軸的范圍。 `{joint, marginal, annot}_kws`:dicts, 可選 > 額外的關鍵字參數。 `kwargs`:鍵值對 > 額外的關鍵字參數會被傳給繪制中心軸圖像的函數,取代`joint_kws`字典中的項。 返回值:`grid`:[`JointGrid`](seaborn.JointGrid.html#seaborn.JointGrid "seaborn.JointGrid") > [`JointGrid`](seaborn.JointGrid.html#seaborn.JointGrid "seaborn.JointGrid")對象. 參考 繪制圖像的 Grid 類。如果需要更多的靈活性,可以直接使用 Grid 類。 示例 繪制帶有側邊直方圖的散點圖: ```py >>> import numpy as np, pandas as pd; np.random.seed(0) >>> import seaborn as sns; sns.set(style="white", color_codes=True) >>> tips = sns.load_dataset("tips") >>> g = sns.jointplot(x="total_bill", y="tip", data=tips) ``` ![http://seaborn.pydata.org/_images/seaborn-jointplot-1.png](https://img.kancloud.cn/3d/87/3d8795ee4da0c2e491832847fe0232e3_540x540.jpg) 添加回歸線及核密度擬合: ```py >>> g = sns.jointplot("total_bill", "tip", data=tips, kind="reg") ``` ![http://seaborn.pydata.org/_images/seaborn-jointplot-2.png](https://img.kancloud.cn/9c/b8/9cb84b605325b06e104630c7af30dc8d_540x540.jpg) 將散點圖替換為六角形箱體圖: ```py >>> g = sns.jointplot("total_bill", "tip", data=tips, kind="hex") ``` ![http://seaborn.pydata.org/_images/seaborn-jointplot-3.png](https://img.kancloud.cn/17/7c/177cf5c7451da4701e3e86f88eac752a_540x540.jpg) 將散點圖和直方圖替換為密度估計,并且將側邊軸與中心軸對齊: ```py >>> iris = sns.load_dataset("iris") >>> g = sns.jointplot("sepal_width", "petal_length", data=iris, ... kind="kde", space=0, color="g") ``` ![http://seaborn.pydata.org/_images/seaborn-jointplot-4.png](https://img.kancloud.cn/0b/23/0b23c35e4cefb6d30d190d92b5bd6ef0_540x540.jpg) 繪制散點圖,添加中心密度估計: ```py >>> g = (sns.jointplot("sepal_length", "sepal_width", ... data=iris, color="k") ... .plot_joint(sns.kdeplot, zorder=0, n_levels=6)) ``` ![http://seaborn.pydata.org/_images/seaborn-jointplot-5.png](https://img.kancloud.cn/ac/65/ac651ee342d99c5ec15b07b500594fb3_540x540.jpg) 不適用 Pandas, 直接傳輸向量,隨后給軸命名: ```py >>> x, y = np.random.randn(2, 300) >>> g = (sns.jointplot(x, y, kind="hex") ... .set_axis_labels("x", "y")) ``` ![http://seaborn.pydata.org/_images/seaborn-jointplot-6.png](https://img.kancloud.cn/1d/75/1d7588b09ff312a29d860ffe4698c373_540x540.jpg) 繪制側邊圖空間更大的圖像: ```py >>> g = sns.jointplot("total_bill", "tip", data=tips, ... height=5, ratio=3, color="g") ``` ![http://seaborn.pydata.org/_images/seaborn-jointplot-7.png](https://img.kancloud.cn/40/eb/40ebbd26b1d4d563688a9d283690dd39_450x450.jpg) 傳遞關鍵字參數給后續繪制函數: ```py >>> g = sns.jointplot("petal_length", "sepal_length", data=iris, ... marginal_kws=dict(bins=15, rug=True), ... annot_kws=dict(stat="r"), ... s=40, edgecolor="w", linewidth=1) ``` ![http://seaborn.pydata.org/_images/seaborn-jointplot-8.png](https://img.kancloud.cn/59/9f/599f8a9851ad1330be6b241a2c8035b9_540x540.jpg)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看