{"id":1001927,"date":"2024-12-27T10:04:26","date_gmt":"2024-12-27T02:04:26","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1001927.html"},"modified":"2024-12-27T10:04:41","modified_gmt":"2024-12-27T02:04:41","slug":"python%e5%a6%82%e4%bd%95%e7%bb%98%e5%88%b6%e5%a0%86%e5%8f%a0%e7%ba%bf%e5%9b%be","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1001927.html","title":{"rendered":"python\u5982\u4f55\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25075904\/e8bfa7e3-e2b1-45ea-b09b-49bd26f9125a.webp\" alt=\"python\u5982\u4f55\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528Matplotlib\u5e93\u7684<code>stackplot<\/code>\u51fd\u6570\u3001Pandas\u5e93\u7684<code>plot.area<\/code>\u65b9\u6cd5\u3002Matplotlib\u63d0\u4f9b\u4e86\u5e95\u5c42\u7684\u7ed8\u56fe\u529f\u80fd\uff0c\u7075\u6d3b\u6027\u9ad8\uff1b\u800cPandas\u5219\u66f4\u52a0\u7b80\u6d01\u548c\u9ad8\u6548\uff0c\u9002\u5408\u5904\u7406DataFrame\u6570\u636e\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001MATPLOTLIB\u5e93\u4e2d\u7684STACKPLOT\u51fd\u6570<\/p>\n<\/p>\n<p><p>Matplotlib\u662fPython\u4e2d\u6700\u5e38\u7528\u7684\u7ed8\u56fe\u5e93\u4e4b\u4e00\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u6765\u521b\u5efa\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u8868\u3002\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u7684\u4e3b\u8981\u51fd\u6570\u662f<code>stackplot<\/code>\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5\u548c\u5bfc\u5165Matplotlib<\/strong><\/li>\n<\/ol>\n<p><p>\u8981\u4f7f\u7528Matplotlib\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd\u5b83\u5df2\u5b89\u88c5\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install matplotlib<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728Python\u811a\u672c\u6216Jupyter Notebook\u4e2d\u5bfc\u5165\u5b83\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u51c6\u5907\u6570\u636e<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u4e4b\u524d\uff0c\u9700\u8981\u51c6\u5907\u597d\u6570\u636e\u3002\u5047\u8bbe\u6211\u4eec\u6709\u4ee5\u4e0b\u6570\u636e\u96c6\uff0c\u8868\u793a\u4e0d\u540c\u5e74\u4efd\u7684\u51e0\u79cd\u4ea7\u54c1\u9500\u91cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">years = [2016, 2017, 2018, 2019, 2020]<\/p>\n<p>product_A = [10, 15, 20, 25, 30]<\/p>\n<p>product_B = [20, 25, 30, 35, 40]<\/p>\n<p>product_C = [15, 18, 22, 24, 28]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u4f7f\u7528stackplot\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe<\/strong><\/li>\n<\/ol>\n<p><p>\u4f7f\u7528<code>stackplot<\/code>\u51fd\u6570\u53ef\u4ee5\u8f7b\u677e\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">plt.stackplot(years, product_A, product_B, product_C, labels=[&#39;Product A&#39;, &#39;Product B&#39;, &#39;Product C&#39;])<\/p>\n<p>plt.legend(loc=&#39;upper left&#39;)<\/p>\n<p>plt.title(&#39;Stacked Line Plot of Product Sales&#39;)<\/p>\n<p>plt.xlabel(&#39;Year&#39;)<\/p>\n<p>plt.ylabel(&#39;Sales&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\uff0c<code>stackplot<\/code>\u51fd\u6570\u7528\u4e8e\u521b\u5efa\u5806\u53e0\u7ebf\u56fe\uff0c<code>labels<\/code>\u53c2\u6570\u7528\u4e8e\u4e3a\u6bcf\u4e2a\u5806\u53e0\u533a\u57df\u6dfb\u52a0\u6807\u7b7e\uff0c<code>legend<\/code>\u51fd\u6570\u7528\u4e8e\u6dfb\u52a0\u56fe\u4f8b\u3002<\/p>\n<\/p>\n<ol start=\"4\">\n<li><strong>\u81ea\u5b9a\u4e49\u56fe\u8868<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u989c\u8272\u3001\u900f\u660e\u5ea6\u548c\u7ebf\u6761\u6837\u5f0f\u6765\u81ea\u5b9a\u4e49\u56fe\u8868\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">colors = [&#39;#FF9999&#39;, &#39;#66B3FF&#39;, &#39;#99FF99&#39;]<\/p>\n<p>plt.stackplot(years, product_A, product_B, product_C, labels=[&#39;Product A&#39;, &#39;Product B&#39;, &#39;Product C&#39;], colors=colors, alpha=0.8)<\/p>\n<p>plt.legend(loc=&#39;upper left&#39;)<\/p>\n<p>plt.title(&#39;Stacked Line Plot of Product Sales&#39;)<\/p>\n<p>plt.xlabel(&#39;Year&#39;)<\/p>\n<p>plt.ylabel(&#39;Sales&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u63a7\u5236\u56fe\u8868\u7684\u5916\u89c2\u548c\u6837\u5f0f\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001PANDAS\u5e93\u4e2d\u7684PLOT.AREA\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>Pandas\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6570\u636e\u5206\u6790\u5e93\uff0c\u5b83\u4e0eMatplotlib\u7d27\u5bc6\u96c6\u6210\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u7ed8\u5236\u56fe\u8868\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5\u548c\u5bfc\u5165Pandas<\/strong><\/li>\n<\/ol>\n<p><p>\u540c\u6837\u5730\uff0c\u9996\u5148\u9700\u8981\u786e\u4fddPandas\u5df2\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pandas<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\u5728Python\u811a\u672c\u6216Jupyter Notebook\u4e2d\u5bfc\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u51c6\u5907\u6570\u636e<\/strong><\/li>\n<\/ol>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u5c06\u6570\u636e\u653e\u5165DataFrame\u4e2d\uff0c\u8fd9\u6837\u66f4\u4fbf\u4e8e\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">data = {<\/p>\n<p>    &#39;Year&#39;: [2016, 2017, 2018, 2019, 2020],<\/p>\n<p>    &#39;Product A&#39;: [10, 15, 20, 25, 30],<\/p>\n<p>    &#39;Product B&#39;: [20, 25, 30, 35, 40],<\/p>\n<p>    &#39;Product C&#39;: [15, 18, 22, 24, 28]<\/p>\n<p>}<\/p>\n<p>df = pd.DataFrame(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u4f7f\u7528plot.area\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe<\/strong><\/li>\n<\/ol>\n<p><p>\u901a\u8fc7Pandas\u7684<code>plot.area<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5feb\u901f\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">df.set_index(&#39;Year&#39;).plot.area(alpha=0.8)<\/p>\n<p>plt.title(&#39;Stacked Area Plot of Product Sales&#39;)<\/p>\n<p>plt.xlabel(&#39;Year&#39;)<\/p>\n<p>plt.ylabel(&#39;Sales&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>set_index(&#39;Year&#39;)<\/code>\u5c06\u5e74\u4efd\u8bbe\u7f6e\u4e3a\u7d22\u5f15\uff0c<code>plot.area<\/code>\u7528\u4e8e\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u3002<\/p>\n<\/p>\n<ol start=\"4\">\n<li><strong>\u81ea\u5b9a\u4e49\u56fe\u8868<\/strong><\/li>\n<\/ol>\n<p><p>\u4e0eMatplotlib\u7c7b\u4f3c\uff0c\u53ef\u4ee5\u901a\u8fc7Pandas\u81ea\u5b9a\u4e49\u56fe\u8868\u7684\u6837\u5f0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">df.set_index(&#39;Year&#39;).plot.area(stacked=True, alpha=0.6, colormap=&#39;viridis&#39;)<\/p>\n<p>plt.title(&#39;Customized Stacked Area Plot&#39;)<\/p>\n<p>plt.xlabel(&#39;Year&#39;)<\/p>\n<p>plt.ylabel(&#39;Sales&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u8c03\u8272\u677f\u548c\u900f\u660e\u5ea6\u53ef\u4ee5\u4f7f\u56fe\u8868\u66f4\u52a0\u7f8e\u89c2\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u6570\u636e\u9884\u5904\u7406\u4e0e\u56fe\u8868\u7f8e\u5316<\/p>\n<\/p>\n<ol>\n<li><strong>\u6570\u636e\u9884\u5904\u7406<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6570\u636e\u901a\u5e38\u9700\u8981\u7ecf\u8fc7\u9884\u5904\u7406\u624d\u80fd\u8fdb\u884c\u53ef\u89c6\u5316\u3002\u53ef\u80fd\u9700\u8981\u5904\u7406\u7684\u6570\u636e\u95ee\u9898\u5305\u62ec\u7f3a\u5931\u503c\u3001\u91cd\u590d\u503c\u3001\u5f02\u5e38\u503c\u7b49\u3002Pandas\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u6765\u5904\u7406\u8fd9\u4e9b\u95ee\u9898\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u7f3a\u5931\u503c\u5904\u7406<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528<code>fillna<\/code>\u6216<code>dropna<\/code>\u51fd\u6570\u3002<\/li>\n<li><strong>\u91cd\u590d\u503c\u5904\u7406<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528<code>drop_duplicates<\/code>\u51fd\u6570\u3002<\/li>\n<li><strong>\u5f02\u5e38\u503c\u5904\u7406<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528\u7edf\u8ba1\u65b9\u6cd5\u6216\u53ef\u89c6\u5316\u65b9\u6cd5\uff08\u5982\u7bb1\u7ebf\u56fe\uff09\u8bc6\u522b\u5e76\u5904\u7406\u3002<\/li>\n<\/ul>\n<ol start=\"2\">\n<li><strong>\u56fe\u8868\u7f8e\u5316<\/strong><\/li>\n<\/ol>\n<ul>\n<li><strong>\u6dfb\u52a0\u6ce8\u91ca<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528<code>annotate<\/code>\u51fd\u6570\u5728\u56fe\u8868\u4e0a\u6dfb\u52a0\u6ce8\u91ca\uff0c\u4ee5\u6807\u8bb0\u7279\u5b9a\u7684\u6570\u636e\u70b9\u3002<\/li>\n<li><strong>\u8c03\u6574\u8f74\u8303\u56f4<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528<code>xlim<\/code>\u548c<code>ylim<\/code>\u51fd\u6570\u8c03\u6574\u5750\u6807\u8f74\u7684\u8303\u56f4\u3002<\/li>\n<li><strong>\u6dfb\u52a0\u7f51\u683c<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528<code>grid<\/code>\u51fd\u6570\u6dfb\u52a0\u7f51\u683c\u7ebf\uff0c\u4ee5\u63d0\u9ad8\u56fe\u8868\u7684\u53ef\u8bfb\u6027\u3002<\/li>\n<\/ul>\n<p><p>\u56db\u3001\u5b9e\u9645\u5e94\u7528\u573a\u666f<\/p>\n<\/p>\n<p><p>\u5806\u53e0\u7ebf\u56fe\u5728\u8bb8\u591a\u9886\u57df\u90fd\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u5c24\u5176\u662f\u5728\u4ee5\u4e0b\u573a\u666f\u4e2d\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u8d22\u52a1\u6570\u636e\u5206\u6790<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u8d22\u52a1\u5206\u6790\u4e2d\uff0c\u5806\u53e0\u7ebf\u56fe\u53ef\u4ee5\u7528\u6765\u5c55\u793a\u4e0d\u540c\u90e8\u95e8\u6216\u4ea7\u54c1\u7ebf\u7684\u6536\u5165\u548c\u6210\u672c\u968f\u65f6\u95f4\u7684\u53d8\u5316\u3002\u8fd9\u6709\u52a9\u4e8e\u8bc6\u522b\u8d8b\u52bf\u548c\u6a21\u5f0f\uff0c\u4ee5\u53ca\u786e\u5b9a\u54ea\u4e9b\u4e1a\u52a1\u9886\u57df\u8868\u73b0\u826f\u597d\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u5e02\u573a\u8425\u9500<\/strong><\/li>\n<\/ol>\n<p><p>\u5e02\u573a\u8425\u9500\u4eba\u5458\u53ef\u4ee5\u4f7f\u7528\u5806\u53e0\u7ebf\u56fe\u6765\u5206\u6790\u5e02\u573a\u4efd\u989d\u7684\u53d8\u5316\u3002\u901a\u8fc7\u5c55\u793a\u4e0d\u540c\u54c1\u724c\u5728\u5e02\u573a\u4e2d\u7684\u4efd\u989d\u53d8\u5316\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5236\u5b9a\u7ade\u4e89\u7b56\u7565\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u73af\u5883\u79d1\u5b66<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u73af\u5883\u79d1\u5b66\u4e2d\uff0c\u5806\u53e0\u7ebf\u56fe\u53ef\u4ee5\u7528\u6765\u5c55\u793a\u4e0d\u540c\u6c61\u67d3\u7269\u7684\u6d53\u5ea6\u968f\u65f6\u95f4\u7684\u53d8\u5316\u3002\u8fd9\u6709\u52a9\u4e8e\u8bc6\u522b\u6c61\u67d3\u6e90\u548c\u5236\u5b9a\u6cbb\u7406\u63aa\u65bd\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4f9b\u9009\u62e9\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528Matplotlib\u5e93\u7684<code>stackplot<\/code>\u51fd\u6570\u548cPandas\u5e93\u7684<code>plot.area<\/code>\u65b9\u6cd5\u3002\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u6570\u636e\u7684\u590d\u6742\u6027\u548c\u4e2a\u4eba\u7684\u9700\u6c42\u3002\u6b64\u5916\uff0c\u8fdb\u884c\u9002\u5f53\u7684\u6570\u636e\u9884\u5904\u7406\u548c\u56fe\u8868\u7f8e\u5316\uff0c\u53ef\u4ee5\u63d0\u9ad8\u53ef\u89c6\u5316\u7684\u6548\u679c\u548c\u4fe1\u606f\u4f20\u9012\u7684\u6548\u7387\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5806\u53e0\u7ebf\u56fe\u53ef\u4ee5\u5e7f\u6cdb\u5e94\u7528\u4e8e\u8d22\u52a1\u5206\u6790\u3001\u5e02\u573a\u8425\u9500\u548c\u73af\u5883\u79d1\u5b66\u7b49\u9886\u57df\uff0c\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7406\u89e3\u6570\u636e\u80cc\u540e\u7684\u6545\u4e8b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u901a\u5e38\u4f7f\u7528Matplotlib\u5e93\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u591a\u4e2a\u7ebf\u6761\u5e76\u5229\u7528<code>fill_between<\/code>\u51fd\u6570\u6765\u5b9e\u73b0\u5806\u53e0\u6548\u679c\u3002\u5177\u4f53\u6b65\u9aa4\u5305\u62ec\uff1a\u5b89\u88c5Matplotlib\u5e93\uff0c\u5bfc\u5165\u5fc5\u8981\u7684\u6a21\u5757\uff0c\u51c6\u5907\u6570\u636e\uff0c\u4f7f\u7528<code>plot<\/code>\u51fd\u6570\u7ed8\u5236\u57fa\u7840\u7ebf\u56fe\uff0c\u6700\u540e\u8c03\u7528<code>fill_between<\/code>\u6765\u5b9e\u73b0\u5806\u53e0\u6548\u679c\u3002<\/p>\n<p><strong>\u6709\u54ea\u4e9b\u5e38\u7528\u7684Python\u5e93\u53ef\u4ee5\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\uff1f<\/strong><br \/>\u9664\u4e86Matplotlib\uff0cSeaborn\u548cPandas\u4e5f\u63d0\u4f9b\u4e86\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u7684\u529f\u80fd\u3002Seaborn\u53ef\u4ee5\u7b80\u5316\u590d\u6742\u7684\u56fe\u5f62\u7ed8\u5236\uff0c\u800cPandas\u5219\u5141\u8bb8\u76f4\u63a5\u4eceDataFrame\u4e2d\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\uff0c\u63d0\u4f9b\u4e86\u4fbf\u6377\u7684\u6570\u636e\u5904\u7406\u548c\u53ef\u89c6\u5316\u65b9\u6cd5\u3002<\/p>\n<p><strong>\u5728\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u65f6\u5e94\u8be5\u6ce8\u610f\u54ea\u4e9b\u4e8b\u9879\uff1f<\/strong><br \/>\u5728\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u65f6\uff0c\u786e\u4fdd\u6570\u636e\u7684\u987a\u5e8f\u548c\u683c\u5f0f\u6b63\u786e\u662f\u81f3\u5173\u91cd\u8981\u7684\u3002\u6570\u636e\u5e94\u4ee5\u9002\u5f53\u7684\u65b9\u5f0f\u8fdb\u884c\u5f52\u7c7b\u548c\u6574\u7406\uff0c\u4ee5\u786e\u4fdd\u56fe\u5f62\u7684\u53ef\u8bfb\u6027\u3002\u6b64\u5916\uff0c\u9009\u62e9\u5408\u9002\u7684\u989c\u8272\u548c\u6807\u8bb0\u53ef\u4ee5\u5e2e\u52a9\u533a\u5206\u4e0d\u540c\u7684\u6570\u636e\u7cfb\u5217\uff0c\u63d0\u9ad8\u56fe\u5f62\u7684\u89c6\u89c9\u6548\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u7ed8\u5236\u5806\u53e0\u7ebf\u56fe\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528Matplotlib\u5e93\u7684stackpl [&hellip;]","protected":false},"author":3,"featured_media":1001964,"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\/1001927"}],"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=1001927"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1001927\/revisions"}],"predecessor-version":[{"id":1001973,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1001927\/revisions\/1001973"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1001964"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1001927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1001927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1001927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}