{"id":1022013,"date":"2024-12-27T13:29:38","date_gmt":"2024-12-27T05:29:38","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1022013.html"},"modified":"2024-12-27T13:29:41","modified_gmt":"2024-12-27T05:29:41","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e7%94%bb%e5%9b%beseth","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1022013.html","title":{"rendered":"\u5982\u4f55\u7528python\u753b\u56feseth"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25164357\/ef66aeaa-7edd-432d-b7f5-82e4eb17149d.webp\" alt=\"\u5982\u4f55\u7528python\u753b\u56feseth\" \/><\/p>\n<p><p> \u5728Python\u4e2d\uff0c\u7ed8\u56fe\u662f\u6570\u636e\u5206\u6790\u548c\u53ef\u89c6\u5316\u7684\u91cd\u8981\u7ec4\u6210\u90e8\u5206\u3002<strong>\u4f7f\u7528Python\u7ed8\u56fe\u7684\u6700\u4f73\u5de5\u5177\u4e4b\u4e00\u662fMatplotlib\u3001Seaborn\u548cPlotly<\/strong>\u3002\u8fd9\u4e09\u4e2a\u5e93\u63d0\u4f9b\u4e86\u5f3a\u5927\u4e14\u7075\u6d3b\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u7ed8\u5236\u4ece\u7b80\u5355\u7684\u7ebf\u56fe\u5230\u590d\u6742\u76843D\u56fe\u5f62\u7684\u5404\u79cd\u56fe\u5f62\u3002<strong>Matplotlib\u662f\u6700\u57fa\u7840\u7684\u5e93\uff0c\u9002\u5408\u521d\u5b66\u8005\uff0cSeaborn\u5728Matplotlib\u7684\u57fa\u7840\u4e0a\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u63a5\u53e3\uff0c\u66f4\u9002\u5408\u7edf\u8ba1\u56fe\u8868\uff0c\u800cPlotly\u5219\u63d0\u4f9b\u4e86\u4ea4\u4e92\u5f0f\u56fe\u5f62\u7684\u80fd\u529b<\/strong>\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u5982\u4f55\u5229\u7528\u8fd9\u4e9b\u5de5\u5177\u6765\u7ed8\u5236\u4e0d\u540c\u7c7b\u578b\u7684\u56fe\u5f62\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001MATPLOTLIB\u7684\u4f7f\u7528<\/h3>\n<\/p>\n<p><p>Matplotlib\u662fPython\u4e2d\u6700\u5e38\u7528\u7684\u7ed8\u56fe\u5e93\u4e4b\u4e00\u3002\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u6765\u521b\u5efa\u9759\u6001\u3001\u52a8\u6001\u548c\u4ea4\u4e92\u5f0f\u56fe\u8868\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u57fa\u7840\u7ed8\u56fe<\/h4>\n<\/p>\n<p><p>Matplotlib\u7684\u6838\u5fc3\u662f<code>pyplot<\/code>\u6a21\u5757\uff0c\u5b83\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u4e8eMATLAB\u7684\u7ed8\u56fe\u63a5\u53e3\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u5c55\u793a\u5982\u4f55\u7ed8\u5236\u57fa\u672c\u7684\u7ebf\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u51c6\u5907\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [2, 3, 5, 7, 11]<\/p>\n<h2><strong>\u521b\u5efa\u56fe\u5f62<\/strong><\/h2>\n<p>plt.plot(x, y, label=&#39;\u7ebf\u56fe&#39;, color=&#39;b&#39;, marker=&#39;o&#39;)<\/p>\n<p>plt.xlabel(&#39;X \u8f74&#39;)<\/p>\n<p>plt.ylabel(&#39;Y \u8f74&#39;)<\/p>\n<p>plt.title(&#39;\u7b80\u5355\u7ebf\u56fe&#39;)<\/p>\n<p>plt.legend()<\/p>\n<h2><strong>\u663e\u793a\u56fe\u5f62<\/strong><\/h2>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>plt.plot()<\/code>\u51fd\u6570\u6765\u7ed8\u5236\u7ebf\u56fe\uff0c\u5e76\u901a\u8fc7<code>xlabel<\/code>\u548c<code>ylabel<\/code>\u6765\u8bbe\u7f6e\u8f74\u6807\u7b7e\uff0c<code>title<\/code>\u6765\u8bbe\u7f6e\u56fe\u5f62\u6807\u9898\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u5b50\u56fe\u548c\u56fe\u5f62\u5e03\u5c40<\/h4>\n<\/p>\n<p><p>Matplotlib\u5141\u8bb8\u901a\u8fc7<code>subplot<\/code>\u51fd\u6570\u521b\u5efa\u591a\u4e2a\u5b50\u56fe\uff0c\u4ee5\u4fbf\u5728\u4e00\u4e2a\u56fe\u5f62\u7a97\u53e3\u4e2d\u663e\u793a\u591a\u4e2a\u56fe\u8868\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u521b\u5efa\u56fe\u5f62<\/strong><\/h2>\n<p>plt.figure(figsize=(10, 5))<\/p>\n<h2><strong>\u7b2c\u4e00\u4e2a\u5b50\u56fe<\/strong><\/h2>\n<p>plt.subplot(1, 2, 1)<\/p>\n<p>plt.plot([1, 2, 3], [4, 5, 6], &#39;r&#39;)<\/p>\n<p>plt.title(&#39;\u5b50\u56fe 1&#39;)<\/p>\n<h2><strong>\u7b2c\u4e8c\u4e2a\u5b50\u56fe<\/strong><\/h2>\n<p>plt.subplot(1, 2, 2)<\/p>\n<p>plt.plot([1, 2, 3], [1, 2, 3], &#39;b&#39;)<\/p>\n<p>plt.title(&#39;\u5b50\u56fe 2&#39;)<\/p>\n<h2><strong>\u663e\u793a\u56fe\u5f62<\/strong><\/h2>\n<p>plt.tight_layout()<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>subplot()<\/code>\u51fd\u6570\u7684\u53c2\u6570\u6307\u5b9a\u4e86\u5b50\u56fe\u7684\u5e03\u5c40\uff1a<code>(\u884c\u6570, \u5217\u6570, \u5f53\u524d\u5b50\u56fe\u7684\u7d22\u5f15)<\/code>\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001SEABORN\u7684\u4f7f\u7528<\/h3>\n<\/p>\n<p><p>Seaborn\u662f\u4e00\u4e2a\u57fa\u4e8eMatplotlib\u7684\u9ad8\u7ea7\u6570\u636e\u53ef\u89c6\u5316\u5e93\uff0c\u4e13\u4e3a\u7edf\u8ba1\u56fe\u8868\u8bbe\u8ba1\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u57fa\u672c\u56fe\u8868<\/h4>\n<\/p>\n<p><p>Seaborn\u7b80\u5316\u4e86\u521b\u5efa\u7f8e\u89c2\u4e14\u4fe1\u606f\u4e30\u5bcc\u7684\u7edf\u8ba1\u56fe\u8868\u7684\u8fc7\u7a0b\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528Seaborn\u7ed8\u5236\u6563\u70b9\u56fe\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import seaborn as sns<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>import pandas as pd<\/p>\n<h2><strong>\u521b\u5efa\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = pd.DataFrame({<\/p>\n<p>    &#39;x&#39;: [1, 2, 3, 4, 5],<\/p>\n<p>    &#39;y&#39;: [2, 3, 5, 7, 11],<\/p>\n<p>    &#39;z&#39;: [5, 4, 3, 2, 1]<\/p>\n<p>})<\/p>\n<h2><strong>\u7ed8\u5236\u6563\u70b9\u56fe<\/strong><\/h2>\n<p>sns.scatterplot(x=&#39;x&#39;, y=&#39;y&#39;, size=&#39;z&#39;, data=data, hue=&#39;z&#39;, palette=&#39;viridis&#39;)<\/p>\n<p>plt.title(&#39;Seaborn \u6563\u70b9\u56fe&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Seaborn\u901a\u8fc7\u66f4\u9ad8\u5c42\u7684\u63a5\u53e3\u63d0\u4f9b\u4e86\u4e00\u79cd\u66f4\u76f4\u89c2\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u56fe\u8868\u3002<code>scatterplot<\/code>\u51fd\u6570\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a<code>hue<\/code>\u548c<code>size<\/code>\u53c2\u6570\u6765\u521b\u5efa\u591a\u7ef4\u6570\u636e\u7684\u53ef\u89c6\u5316\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u70ed\u56fe\u548c\u5206\u7c7b\u56fe<\/h4>\n<\/p>\n<p><p>Seaborn\u7279\u522b\u64c5\u957f\u4e8e\u7ed8\u5236\u70ed\u56fe\u548c\u5206\u7c7b\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import seaborn as sns<\/p>\n<p>import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u968f\u673a\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.rand(10, 12)<\/p>\n<h2><strong>\u7ed8\u5236\u70ed\u56fe<\/strong><\/h2>\n<p>sns.heatmap(data, annot=True, fmt=&quot;.1f&quot;)<\/p>\n<p>plt.title(&#39;Seaborn \u70ed\u56fe&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u70ed\u56fe\u80fd\u591f\u76f4\u89c2\u5730\u5c55\u793a\u6570\u636e\u77e9\u9635\u4e2d\u7684\u6570\u503c\u6a21\u5f0f\uff0c<code>annot=True<\/code>\u53c2\u6570\u53ef\u4ee5\u5728\u6bcf\u4e2a\u5355\u5143\u683c\u4e0a\u663e\u793a\u6570\u503c\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001PLOTLY\u7684\u4f7f\u7528<\/h3>\n<\/p>\n<p><p>Plotly\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u4ea4\u4e92\u5f0f\u7ed8\u56fe\u5e93\uff0c\u9002\u5408\u521b\u5efa\u7f51\u7edc\u5e94\u7528\u548c\u52a8\u6001\u56fe\u8868\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u57fa\u672c\u7ed8\u56fe<\/h4>\n<\/p>\n<p><p>Plotly\u63d0\u4f9b\u4e86\u975e\u5e38\u76f4\u89c2\u7684\u63a5\u53e3\u6765\u521b\u5efa\u4ea4\u4e92\u5f0f\u56fe\u8868\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import plotly.express as px<\/p>\n<h2><strong>\u521b\u5efa\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>df = px.data.iris()<\/p>\n<h2><strong>\u7ed8\u5236\u4ea4\u4e92\u5f0f\u6563\u70b9\u56fe<\/strong><\/h2>\n<p>fig = px.scatter(df, x=&#39;sepal_width&#39;, y=&#39;sepal_length&#39;, color=&#39;species&#39;,<\/p>\n<p>                 title=&#39;Plotly \u4ea4\u4e92\u5f0f\u6563\u70b9\u56fe&#39;)<\/p>\n<p>fig.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Plotly\u7684<code>express<\/code>\u6a21\u5757\u4f7f\u5f97\u521b\u5efa\u4ea4\u4e92\u5f0f\u56fe\u8868\u53d8\u5f97\u975e\u5e38\u7b80\u5355\uff0c\u901a\u8fc7<code>scatter<\/code>\u51fd\u6570\u53ef\u4ee5\u5feb\u901f\u751f\u6210\u4ea4\u4e92\u5f0f\u6563\u70b9\u56fe\u3002<\/p>\n<\/p>\n<p><h4>2\u30013D\u7ed8\u56fe<\/h4>\n<\/p>\n<p><p>Plotly\u8fd8\u652f\u6301\u7ed8\u52363D\u56fe\u8868\uff0c\u8fd9\u5728\u5904\u7406\u591a\u7ef4\u6570\u636e\u65f6\u975e\u5e38\u6709\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import plotly.graph_objects as go<\/p>\n<h2><strong>\u521b\u5efa\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>x, y, z = [1, 2, 3, 4, 5], [2, 3, 4, 5, 6], [5, 6, 7, 8, 9]<\/p>\n<h2><strong>\u521b\u5efa3D\u6563\u70b9\u56fe<\/strong><\/h2>\n<p>fig = go.Figure(data=[go.Scatter3d(x=x, y=y, z=z, mode=&#39;markers&#39;)])<\/p>\n<p>fig.update_layout(title=&#39;3D \u6563\u70b9\u56fe&#39;)<\/p>\n<p>fig.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>plotly.graph_objects<\/code>\u6a21\u5757\u5141\u8bb8\u66f4\u9ad8\u7ea7\u7684\u56fe\u5f62\u5b9a\u5236\u548c3D\u7ed8\u56fe\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5728\u6570\u636e\u5206\u6790\u4e2d\u7684\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u7ed8\u56fe\u5728\u6570\u636e\u5206\u6790\u8fc7\u7a0b\u4e2d\u8d77\u7740\u81f3\u5173\u91cd\u8981\u7684\u4f5c\u7528\uff0c\u5b83\u4e0d\u4ec5\u4ec5\u662f\u5c55\u793a\u6570\u636e\uff0c\u66f4\u662f\u5e2e\u52a9\u5206\u6790\u8005\u4ece\u6570\u636e\u4e2d\u53d1\u73b0\u6a21\u5f0f\u3001\u8d8b\u52bf\u548c\u5f02\u5e38\u70b9\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u63a2\u7d22\u6027\u6570\u636e\u5206\u6790\uff08EDA\uff09<\/h4>\n<\/p>\n<p><p>\u5728\u6570\u636e\u5206\u6790\u7684\u65e9\u671f\u9636\u6bb5\uff0c\u7ed8\u56fe\u7528\u4e8e\u63a2\u7d22\u6027\u6570\u636e\u5206\u6790\uff08EDA\uff09\uff0c\u5e2e\u52a9\u8bc6\u522b\u6570\u636e\u7684\u57fa\u672c\u7279\u5f81\u548c\u6a21\u5f0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import seaborn as sns<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u52a0\u8f7d\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>df = sns.load_dataset(&#39;tips&#39;)<\/p>\n<h2><strong>\u4f7f\u7528Seaborn\u8fdb\u884cEDA<\/strong><\/h2>\n<p>sns.p<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>rplot(df, hue=&#39;sex&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>pairplot<\/code>\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5feb\u901f\u67e5\u770b\u6570\u636e\u96c6\u4e2d\u4e0d\u540c\u53d8\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u6570\u636e\u6e05\u6d17\u548c\u5904\u7406<\/h4>\n<\/p>\n<p><p>\u7ed8\u56fe\u8fd8\u53ef\u4ee5\u5e2e\u52a9\u8bc6\u522b\u6570\u636e\u4e2d\u7684\u5f02\u5e38\u503c\u6216\u7f3a\u5931\u503c\uff0c\u4ee5\u4fbf\u8fdb\u884c\u6570\u636e\u6e05\u6d17\u548c\u5904\u7406\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u521b\u5efa\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = [1, 2, 3, 4, 5, 100]<\/p>\n<h2><strong>\u7ed8\u5236\u7bb1\u7ebf\u56fe<\/strong><\/h2>\n<p>plt.boxplot(data)<\/p>\n<p>plt.title(&#39;\u7bb1\u7ebf\u56fe&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7bb1\u7ebf\u56fe\u662f\u4e00\u79cd\u5e38\u7528\u7684\u5de5\u5177\uff0c\u7528\u4e8e\u68c0\u6d4b\u6570\u636e\u4e2d\u7684\u5f02\u5e38\u503c\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u7efc\u5408\u5b9e\u4f8b\uff1a\u4ece\u6570\u636e\u5230\u56fe\u8868<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u5c55\u793a\u5982\u4f55\u5c06\u524d\u8ff0\u6280\u672f\u5e94\u7528\u4e8e\u5b9e\u9645\u7684\u6570\u636e\u5206\u6790\u4efb\u52a1\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4ece\u6570\u636e\u52a0\u8f7d\u5230\u53ef\u89c6\u5316\u7684\u5b8c\u6574\u5b9e\u4f8b\uff1a<\/p>\n<\/p>\n<p><h4>1\u3001\u52a0\u8f7d\u6570\u636e<\/h4>\n<\/p>\n<p><p>\u6211\u4eec\u5c06\u4f7f\u7528Pandas\u52a0\u8f7d\u4e00\u4e2a\u793a\u4f8b\u6570\u636e\u96c6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u52a0\u8f7d\u793a\u4f8b\u6570\u636e\u96c6<\/strong><\/h2>\n<p>df = pd.read_csv(&#39;your_dataset.csv&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u6570\u636e\u6e05\u6d17<\/h4>\n<\/p>\n<p><p>\u5728\u52a0\u8f7d\u6570\u636e\u540e\uff0c\u6211\u4eec\u9700\u8981\u8fdb\u884c\u6570\u636e\u6e05\u6d17\uff0c\u4ee5\u786e\u4fdd\u6570\u636e\u8d28\u91cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u68c0\u67e5\u7f3a\u5931\u503c<\/p>\n<p>missing_values = df.isnull().sum()<\/p>\n<h2><strong>\u586b\u5145\u7f3a\u5931\u503c<\/strong><\/h2>\n<p>df.fillna(df.mean(), inplace=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u6570\u636e\u5206\u6790<\/h4>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u8fdb\u884c\u57fa\u672c\u7684\u6570\u636e\u5206\u6790\uff0c\u67e5\u770b\u6570\u636e\u7684\u7edf\u8ba1\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u67e5\u770b\u6570\u636e\u7684\u63cf\u8ff0\u6027\u7edf\u8ba1<\/p>\n<p>df.describe()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4\u3001\u6570\u636e\u53ef\u89c6\u5316<\/h4>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u6211\u4eec\u4f7f\u7528Matplotlib\u548cSeaborn\u8fdb\u884c\u6570\u636e\u53ef\u89c6\u5316\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p>import seaborn as sns<\/p>\n<h2><strong>\u7ed8\u5236\u76f8\u5173\u77e9\u9635\u7684\u70ed\u56fe<\/strong><\/h2>\n<p>corr = df.corr()<\/p>\n<p>sns.heatmap(corr, annot=True)<\/p>\n<p>plt.title(&#39;\u76f8\u5173\u77e9\u9635\u70ed\u56fe&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u7ed8\u5236\u76f8\u5173\u77e9\u9635\u7684\u70ed\u56fe\uff0c\u6211\u4eec\u53ef\u4ee5\u8bc6\u522b\u6570\u636e\u96c6\u4e2d\u53d8\u91cf\u4e4b\u95f4\u7684\u76f8\u5173\u6027\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3\u4e0e\u5efa\u8bae<\/h3>\n<\/p>\n<p><p>\u7ed8\u56fe\u662f\u6570\u636e\u79d1\u5b66\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u6280\u80fd\uff0cPython\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u7ed8\u56fe\u5e93\u4ee5\u6ee1\u8db3\u4e0d\u540c\u7684\u9700\u6c42\u3002\u5728\u9009\u62e9\u7ed8\u56fe\u5e93\u65f6\uff0c<strong>\u5e94\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u548c\u56fe\u8868\u7c7b\u578b\u6765\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177<\/strong>\uff1a\u5bf9\u4e8e\u7b80\u5355\u7684\u9759\u6001\u56fe\u8868\uff0cMatplotlib\u662f\u4e0d\u9519\u7684\u9009\u62e9\uff1b\u5bf9\u4e8e\u7edf\u8ba1\u5206\u6790\uff0cSeaborn\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u63a5\u53e3\uff1b\u800c\u5bf9\u4e8e\u9700\u8981\u4ea4\u4e92\u5f0f\u56fe\u8868\u7684\u5e94\u7528\uff0cPlotly\u662f\u6700\u4f73\u9009\u62e9\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5efa\u8bae\u5148\u4ece\u7b80\u5355\u7684\u56fe\u8868\u5f00\u59cb\uff0c\u7136\u540e\u9010\u6b65\u6dfb\u52a0\u66f4\u591a\u7684\u7ec6\u8282\u548c\u590d\u6742\u6027\u3002\u540c\u65f6\uff0c<strong>\u5728\u7ed8\u56fe\u8fc7\u7a0b\u4e2d\u4fdd\u6301\u56fe\u8868\u7684\u7b80\u6d01\u548c\u4fe1\u606f\u4f20\u9012\u7684\u6709\u6548\u6027\u5c24\u4e3a\u91cd\u8981<\/strong>\u3002\u901a\u8fc7\u4e0d\u65ad\u5730\u7ec3\u4e60\u548c\u63a2\u7d22\uff0c\u9010\u6b65\u638c\u63e1\u4e0d\u540c\u5e93\u7684\u7279\u6027\u548c\u4f7f\u7528\u6280\u5de7\uff0c\u5c06\u5927\u5927\u63d0\u5347\u60a8\u7684\u6570\u636e\u53ef\u89c6\u5316\u6280\u80fd\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>1. \u4ec0\u4e48\u662fSeth\uff0c\u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528\u5b83\u8fdb\u884c\u7ed8\u56fe\uff1f<\/strong><br \/>Seth\u662f\u4e00\u4e2a\u7528\u4e8e\u6570\u636e\u53ef\u89c6\u5316\u7684Python\u5e93\uff0c\u4e13\u6ce8\u4e8e\u521b\u5efa\u7b80\u5355\u800c\u7f8e\u89c2\u7684\u56fe\u5f62\u3002\u901a\u8fc7\u5f15\u5165Seth\u5e93\uff0c\u7528\u6237\u53ef\u4ee5\u5feb\u901f\u7ed8\u5236\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u8868\uff0c\u4f8b\u5982\u6298\u7ebf\u56fe\u3001\u67f1\u72b6\u56fe\u548c\u6563\u70b9\u56fe\u3002\u8981\u4f7f\u7528Seth\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5\u8be5\u5e93\uff0c\u5e76\u901a\u8fc7\u5bfc\u5165\u76f8\u5e94\u6a21\u5757\u6765\u5f00\u59cb\u7ed8\u5236\u56fe\u5f62\u3002Seth\u7684\u8bed\u6cd5\u7b80\u6d01\u6613\u61c2\uff0c\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u548c\u4e13\u4e1a\u4eba\u58eb\u3002<\/p>\n<p><strong>2. \u4f7f\u7528Seth\u7ed8\u56fe\u65f6\uff0c\u5982\u4f55\u81ea\u5b9a\u4e49\u56fe\u5f62\u7684\u5916\u89c2\u548c\u98ce\u683c\uff1f<\/strong><br \/>\u5728Seth\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u56fe\u5f62\u5c5e\u6027\u6765\u5b9a\u5236\u5916\u89c2\uff0c\u4f8b\u5982\u989c\u8272\u3001\u7ebf\u578b\u3001\u6807\u8bb0\u6837\u5f0f\u7b49\u3002\u53ef\u4ee5\u4f7f\u7528\u7b80\u5355\u7684\u53c2\u6570\u6765\u8c03\u6574\u56fe\u8868\u7684\u6807\u9898\u3001\u5750\u6807\u8f74\u6807\u7b7e\u4ee5\u53ca\u56fe\u4f8b\u3002\u6b64\u5916\uff0cSeth\u8fd8\u652f\u6301\u4e3b\u9898\u548c\u6837\u5f0f\u7684\u5e94\u7528\uff0c\u4f7f\u5f97\u7528\u6237\u80fd\u591f\u8f7b\u677e\u5b9e\u73b0\u4e13\u4e1a\u7ea7\u7684\u56fe\u5f62\u5916\u89c2\uff0c\u53ea\u9700\u5c11\u91cf\u4ee3\u7801\u5373\u53ef\u5b8c\u6210\u590d\u6742\u7684\u7f8e\u5316\u5de5\u4f5c\u3002<\/p>\n<p><strong>3. \u5982\u4f55\u89e3\u51b3\u5728\u4f7f\u7528Seth\u8fdb\u884c\u7ed8\u56fe\u65f6\u53ef\u80fd\u9047\u5230\u7684\u5e38\u89c1\u95ee\u9898\uff1f<\/strong><br \/>\u5728\u4f7f\u7528Seth\u7ed8\u56fe\u8fc7\u7a0b\u4e2d\uff0c\u7528\u6237\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff0c\u4f8b\u5982\u56fe\u5f62\u4e0d\u663e\u793a\u3001\u6570\u636e\u683c\u5f0f\u9519\u8bef\u7b49\u3002\u9996\u5148\uff0c\u786e\u4fdd\u5df2\u6b63\u786e\u5b89\u88c5Seth\u5e93\uff0c\u5e76\u6b63\u786e\u5bfc\u5165\u3002\u5176\u6b21\uff0c\u68c0\u67e5\u6570\u636e\u7684\u683c\u5f0f\u662f\u5426\u7b26\u5408\u8981\u6c42\uff0c\u4f8b\u5982\u662f\u5426\u4e3a\u6570\u503c\u578b\u6570\u636e\u3002\u6b64\u5916\uff0c\u67e5\u770b\u63a7\u5236\u53f0\u7684\u9519\u8bef\u4fe1\u606f\uff0c\u901a\u5e38\u53ef\u4ee5\u63d0\u4f9b\u89e3\u51b3\u95ee\u9898\u7684\u7ebf\u7d22\u3002\u5982\u679c\u95ee\u9898\u4f9d\u7136\u5b58\u5728\uff0c\u67e5\u9605Seth\u7684\u5b98\u65b9\u6587\u6863\u6216\u793e\u533a\u8bba\u575b\uff0c\u83b7\u53d6\u66f4\u591a\u652f\u6301\u548c\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u7ed8\u56fe\u662f\u6570\u636e\u5206\u6790\u548c\u53ef\u89c6\u5316\u7684\u91cd\u8981\u7ec4\u6210\u90e8\u5206\u3002\u4f7f\u7528Python\u7ed8\u56fe\u7684\u6700\u4f73\u5de5\u5177\u4e4b\u4e00\u662fMatplotli [&hellip;]","protected":false},"author":3,"featured_media":1022022,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1022013"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1022013"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1022013\/revisions"}],"predecessor-version":[{"id":1022024,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1022013\/revisions\/1022024"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1022022"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1022013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1022013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1022013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}