{"id":1124272,"date":"2025-01-08T19:39:49","date_gmt":"2025-01-08T11:39:49","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1124272.html"},"modified":"2025-01-08T19:40:05","modified_gmt":"2025-01-08T11:40:05","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e6%8a%8a%e7%94%bb%e7%9a%84%e5%9b%be%e4%bf%9d%e5%ad%98%e4%b8%8b%e6%9d%a5","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1124272.html","title":{"rendered":"\u5982\u4f55\u7528python\u628a\u753b\u7684\u56fe\u4fdd\u5b58\u4e0b\u6765"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25085413\/8c9b1c74-75f4-4913-aa0c-a83439b1e7e5.webp\" alt=\"\u5982\u4f55\u7528python\u628a\u753b\u7684\u56fe\u4fdd\u5b58\u4e0b\u6765\" \/><\/p>\n<p><p> <strong>\u8981\u7528Python\u628a\u7ed8\u5236\u7684\u56fe\u4fdd\u5b58\u4e0b\u6765\uff0c\u53ef\u4ee5\u4f7f\u7528Matplotlib\u5e93\u3002<\/strong> Matplotlib\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u7ed8\u56fe\u5e93\uff0c\u53ef\u4ee5\u751f\u6210\u5404\u79cd\u56fe\u5f62\uff0c\u5e76\u4e14\u63d0\u4f9b\u4e86\u4fdd\u5b58\u56fe\u50cf\u7684\u529f\u80fd\u3002\u5177\u4f53\u6b65\u9aa4\u5305\u62ec\uff1a<strong>\u5bfc\u5165Matplotlib\u5e93\u3001\u521b\u5efa\u56fe\u5f62\u548c\u8f74\u3001\u7ed8\u5236\u56fe\u5f62\u3001\u4f7f\u7528savefig\u65b9\u6cd5\u4fdd\u5b58\u56fe\u50cf<\/strong>\u3002\u5176\u4e2d\uff0csavefig\u65b9\u6cd5\u662f\u5173\u952e\u6b65\u9aa4\uff0c\u5141\u8bb8\u4f60\u6307\u5b9a\u6587\u4ef6\u540d\u3001\u683c\u5f0f\u3001\u5206\u8fa8\u7387\u7b49\u53c2\u6570\uff0c\u786e\u4fdd\u56fe\u50cf\u4fdd\u5b58\u7b26\u5408\u9884\u671f\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u5bfc\u5165Matplotlib\u5e93<\/h2>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u7ed8\u56fe\u4e4b\u524d\uff0c\u9700\u8981\u5bfc\u5165Matplotlib\u5e93\u3002Matplotlib\u662fPython\u4e2d\u6700\u6d41\u884c\u7684\u7ed8\u56fe\u5e93\u4e4b\u4e00\uff0c\u7279\u522b\u662f\u5176\u5b50\u6a21\u5757pyplot\uff0c\u88ab\u5e7f\u6cdb\u7528\u4e8e\u6570\u636e\u53ef\u89c6\u5316\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u5bfc\u5165pyplot\u6a21\u5757\uff0c\u6211\u4eec\u53ef\u4ee5\u8bbf\u95eeMatplotlib\u7684\u6240\u6709\u529f\u80fd\u3002\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5b89\u88c5Matplotlib\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install matplotlib<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e8c\u3001\u521b\u5efa\u56fe\u5f62\u548c\u8f74<\/h2>\n<\/p>\n<p><p>\u5728\u7ed8\u5236\u56fe\u5f62\u4e4b\u524d\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u56fe\u5f62\u5bf9\u8c61\u548c\u4e00\u4e2a\u6216\u591a\u4e2a\u8f74\u5bf9\u8c61\u3002\u8fd9\u4e9b\u5bf9\u8c61\u5c06\u627f\u8f7d\u6211\u4eec\u7ed8\u5236\u7684\u56fe\u5f62\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fig, ax = plt.subplots()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\u7684<code>subplots<\/code>\u51fd\u6570\u521b\u5efa\u4e86\u4e00\u4e2a\u56fe\u5f62\u5bf9\u8c61\uff08fig\uff09\u548c\u4e00\u4e2a\u8f74\u5bf9\u8c61\uff08ax\uff09\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e9b\u5bf9\u8c61\u6765\u63a7\u5236\u56fe\u5f62\u7684\u5927\u5c0f\u3001\u98ce\u683c\u7b49\u3002<\/p>\n<\/p>\n<p><h2>\u4e09\u3001\u7ed8\u5236\u56fe\u5f62<\/h2>\n<\/p>\n<p><p>\u4e00\u65e6\u521b\u5efa\u4e86\u56fe\u5f62\u548c\u8f74\u5bf9\u8c61\uff0c\u5c31\u53ef\u4ee5\u5f00\u59cb\u7ed8\u5236\u56fe\u5f62\u3002\u4f8b\u5982\uff0c\u7ed8\u5236\u4e00\u4e2a\u7b80\u5355\u7684\u6298\u7ebf\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [10, 20, 25, 30, 35]<\/p>\n<p>ax.plot(x, y)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e24\u4e2a\u5217\u8868x\u548cy\uff0c\u5206\u522b\u4ee3\u8868\u6570\u636e\u70b9\u7684x\u548cy\u5750\u6807\u3002\u7136\u540e\u4f7f\u7528<code>ax.plot<\/code>\u65b9\u6cd5\u7ed8\u5236\u6298\u7ebf\u56fe\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u4f7f\u7528savefig\u65b9\u6cd5\u4fdd\u5b58\u56fe\u50cf<\/h2>\n<\/p>\n<p><p>\u7ed8\u5236\u5b8c\u56fe\u5f62\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528Matplotlib\u7684<code>savefig<\/code>\u65b9\u6cd5\u5c06\u56fe\u50cf\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\u3002\u8fd9\u662f\u4fdd\u5b58\u56fe\u50cf\u7684\u5173\u952e\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fig.savefig(&#39;my_plot.png&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5c06\u56fe\u50cf\u4fdd\u5b58\u4e3a\u540d\u4e3a<code>my_plot.png<\/code>\u7684\u6587\u4ef6\u3002\u4f60\u53ef\u4ee5\u6307\u5b9a\u4e0d\u540c\u7684\u6587\u4ef6\u683c\u5f0f\uff0c\u4f8b\u5982PNG\u3001PDF\u3001SVG\u7b49\u3002Matplotlib\u4f1a\u6839\u636e\u6587\u4ef6\u6269\u5c55\u540d\u81ea\u52a8\u9009\u62e9\u5408\u9002\u7684\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><h3>\u8be6\u7ec6\u63cf\u8ff0savefig\u65b9\u6cd5\u7684\u53c2\u6570<\/h3>\n<\/p>\n<p><p><code>savefig<\/code>\u65b9\u6cd5\u63d0\u4f9b\u4e86\u8bb8\u591a\u53c2\u6570\u6765\u63a7\u5236\u56fe\u50cf\u7684\u4fdd\u5b58\u65b9\u5f0f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u53c2\u6570\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>fname<\/strong>: \u6587\u4ef6\u540d\u6216\u8def\u5f84\uff08\u5fc5\u987b\uff09\u3002<\/li>\n<li><strong>dpi<\/strong>: \u5206\u8fa8\u7387\uff08\u6bcf\u82f1\u5bf8\u70b9\u6570\uff09\uff0c\u9ed8\u8ba4\u503c\u4e3a100\u3002<\/li>\n<li><strong>format<\/strong>: \u6307\u5b9a\u6587\u4ef6\u683c\u5f0f\uff0c\u4f8b\u5982&#39;png&#39;, &#39;pdf&#39;, &#39;svg&#39;\u7b49\u3002<\/li>\n<li><strong>bbox_inches<\/strong>: \u6307\u5b9a\u8981\u4fdd\u5b58\u7684\u56fe\u50cf\u90e8\u5206\uff0c\u53ef\u4ee5\u662f&#39; tight&#39;\u4ee5\u7d27\u5bc6\u9002\u914d\u56fe\u50cf\u5185\u5bb9\u3002<\/li>\n<li><strong>transparent<\/strong>: \u5982\u679c\u4e3aTrue\uff0c\u4fdd\u5b58\u7684\u56fe\u50cf\u80cc\u666f\u5c06\u662f\u900f\u660e\u7684\u3002<\/li>\n<\/ul>\n<p><p>\u4f8b\u5982\uff0c\u8981\u4fdd\u5b58\u4e00\u4e2a\u9ad8\u5206\u8fa8\u7387\u7684PNG\u56fe\u50cf\uff0c\u53ef\u4ee5\u8fd9\u6837\u505a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fig.savefig(&#39;high_res_plot.png&#39;, dpi=300, bbox_inches=&#39;tight&#39;, transparent=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0a\u547d\u4ee4\u5c06\u751f\u6210\u4e00\u4e2a\u9ad8\u5206\u8fa8\u7387\u7684PNG\u56fe\u50cf\uff0c\u5e76\u4e14\u56fe\u50cf\u80cc\u666f\u662f\u900f\u660e\u7684\u3002<\/p>\n<\/p>\n<p><h2>\u4e94\u3001\u793a\u4f8b\u4ee3\u7801<\/h2>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u597d\u5730\u7406\u89e3\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u521b\u5efa\u56fe\u5f62\u548c\u8f74<\/strong><\/h2>\n<p>fig, ax = plt.subplots()<\/p>\n<h2><strong>\u5b9a\u4e49\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [10, 20, 25, 30, 35]<\/p>\n<h2><strong>\u7ed8\u5236\u6298\u7ebf\u56fe<\/strong><\/h2>\n<p>ax.plot(x, y)<\/p>\n<h2><strong>\u8bbe\u7f6e\u6807\u9898\u548c\u6807\u7b7e<\/strong><\/h2>\n<p>ax.set_title(&#39;Example Plot&#39;)<\/p>\n<p>ax.set_xlabel(&#39;X Axis&#39;)<\/p>\n<p>ax.set_ylabel(&#39;Y Axis&#39;)<\/p>\n<h2><strong>\u4fdd\u5b58\u56fe\u50cf<\/strong><\/h2>\n<p>fig.savefig(&#39;example_plot.png&#39;, dpi=300, bbox_inches=&#39;tight&#39;, transparent=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u516d\u3001\u66f4\u591a\u7ed8\u56fe\u529f\u80fd<\/h2>\n<\/p>\n<p><h3>\u7ed8\u5236\u4e0d\u540c\u7c7b\u578b\u7684\u56fe\u5f62<\/h3>\n<\/p>\n<p><p>Matplotlib\u4e0d\u4ec5\u53ef\u4ee5\u7ed8\u5236\u6298\u7ebf\u56fe\uff0c\u8fd8\u652f\u6301\u8bb8\u591a\u5176\u4ed6\u7c7b\u578b\u7684\u56fe\u5f62\uff0c\u4f8b\u5982\u6563\u70b9\u56fe\u3001\u67f1\u72b6\u56fe\u3001\u997c\u56fe\u7b49\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u7ed8\u56fe\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>scatter<\/strong>: \u7ed8\u5236\u6563\u70b9\u56fe<\/li>\n<li><strong>bar<\/strong>: \u7ed8\u5236\u67f1\u72b6\u56fe<\/li>\n<li><strong>hist<\/strong>: \u7ed8\u5236\u76f4\u65b9\u56fe<\/li>\n<li><strong>pie<\/strong>: \u7ed8\u5236\u997c\u56fe<\/li>\n<\/ul>\n<p><p>\u4f8b\u5982\uff0c\u7ed8\u5236\u4e00\u4e2a\u6563\u70b9\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fig, ax = plt.subplots()<\/p>\n<p>ax.scatter(x, y)<\/p>\n<p>fig.savefig(&#39;scatter_plot.png&#39;, dpi=300, bbox_inches=&#39;tight&#39;, transparent=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u81ea\u5b9a\u4e49\u56fe\u5f62\u98ce\u683c<\/h3>\n<\/p>\n<p><p>Matplotlib\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u81ea\u5b9a\u4e49\u9009\u9879\uff0c\u5141\u8bb8\u4f60\u63a7\u5236\u56fe\u5f62\u7684\u5916\u89c2\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4fee\u6539\u7ebf\u6761\u989c\u8272\u3001\u7ebf\u578b\u3001\u6807\u8bb0\u7b49\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">ax.plot(x, y, color=&#39;red&#39;, linestyle=&#39;--&#39;, marker=&#39;o&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5c06\u7ebf\u6761\u989c\u8272\u8bbe\u7f6e\u4e3a\u7ea2\u8272\uff0c\u7ebf\u578b\u8bbe\u7f6e\u4e3a\u865a\u7ebf\uff0c\u5e76\u5728\u6570\u636e\u70b9\u4e0a\u6dfb\u52a0\u5706\u5f62\u6807\u8bb0\u3002<\/p>\n<\/p>\n<p><h3>\u6dfb\u52a0\u7f51\u683c\u548c\u56fe\u4f8b<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8\u56fe\u5f62\u7684\u53ef\u8bfb\u6027\uff0c\u53ef\u4ee5\u6dfb\u52a0\u7f51\u683c\u548c\u56fe\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">ax.grid(True)<\/p>\n<p>ax.legend([&#39;Data Line&#39;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4fdd\u5b58\u4e3a\u591a\u79cd\u6587\u4ef6\u683c\u5f0f<\/h3>\n<\/p>\n<p><p>Matplotlib\u652f\u6301\u5c06\u56fe\u50cf\u4fdd\u5b58\u4e3a\u591a\u79cd\u6587\u4ef6\u683c\u5f0f\u3002\u4f8b\u5982\uff0c\u4fdd\u5b58\u4e3aPDF\u683c\u5f0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fig.savefig(&#39;example_plot.pdf&#39;, bbox_inches=&#39;tight&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e03\u3001\u603b\u7ed3<\/h2>\n<\/p>\n<p><p>\u4f7f\u7528Python\u7684Matplotlib\u5e93\u4fdd\u5b58\u7ed8\u5236\u7684\u56fe\u50cf\u662f\u4e00\u4e2a\u7b80\u5355\u800c\u5f3a\u5927\u7684\u8fc7\u7a0b\u3002\u901a\u8fc7\u5bfc\u5165\u5e93\u3001\u521b\u5efa\u56fe\u5f62\u548c\u8f74\u3001\u7ed8\u5236\u56fe\u5f62\uff0c\u7136\u540e\u4f7f\u7528<code>savefig<\/code>\u65b9\u6cd5\u4fdd\u5b58\u56fe\u50cf\uff0c\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002Matplotlib\u8fd8\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u81ea\u5b9a\u4e49\u9009\u9879\uff0c\u5141\u8bb8\u4f60\u7ed8\u5236\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u5f62\uff0c\u5e76\u63a7\u5236\u5b83\u4eec\u7684\u5916\u89c2\u548c\u4fdd\u5b58\u65b9\u5f0f\u3002\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u4f60\u80fd\u591f\u66f4\u597d\u5730\u638c\u63e1\u8fd9\u4e00\u6280\u80fd\uff0c\u5e76\u5e94\u7528\u5230\u5b9e\u9645\u9879\u76ee\u4e2d\u53bb\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4fdd\u5b58\u56fe\u50cf\u6587\u4ef6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u4fdd\u5b58\u56fe\u50cf\u6587\u4ef6\u901a\u5e38\u4f7f\u7528Matplotlib\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528<code>savefig()<\/code>\u51fd\u6570\u6765\u5b9e\u73b0\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u4f7f\u7528<code>import matplotlib.pyplot as plt<\/code>\u5bfc\u5165\u4e86\u5e93\u3002\u7ed8\u5236\u5b8c\u56fe\u5f62\u540e\uff0c\u4f7f\u7528<code>plt.savefig(&#39;filename.png&#39;)<\/code>\u5c06\u56fe\u5f62\u4fdd\u5b58\u4e3aPNG\u683c\u5f0f\uff0c\u6216\u4f7f\u7528\u5176\u4ed6\u652f\u6301\u7684\u683c\u5f0f\u5982JPEG\u3001PDF\u7b49\u3002\u786e\u4fdd\u5728\u4fdd\u5b58\u4e4b\u524d\u8c03\u7528<code>plt.show()<\/code>\uff0c\u8fd9\u53ef\u4ee5\u5e2e\u52a9\u4f60\u67e5\u770b\u56fe\u5f62\u5e76\u786e\u8ba4\u4fdd\u5b58\u7684\u5185\u5bb9\u3002<\/p>\n<p><strong>\u6211\u5e94\u8be5\u9009\u62e9\u54ea\u79cd\u56fe\u50cf\u683c\u5f0f\u6765\u4fdd\u5b58\u56fe\u5f62\uff1f<\/strong><br \/>\u9009\u62e9\u56fe\u50cf\u683c\u5f0f\u4e3b\u8981\u53d6\u51b3\u4e8e\u4f60\u7684\u9700\u6c42\u3002\u5982\u679c\u9700\u8981\u9ad8\u8d28\u91cf\u7684\u6253\u5370\u7248\u672c\uff0c\u53ef\u4ee5\u9009\u62e9PDF\u6216SVG\u683c\u5f0f\uff0c\u8fd9\u4e9b\u683c\u5f0f\u652f\u6301\u65e0\u635f\u7f29\u653e\u3002\u5bf9\u4e8e\u7f51\u9875\u548c\u6570\u5b57\u5a92\u4f53\uff0cPNG\u683c\u5f0f\u901a\u5e38\u662f\u4e0d\u9519\u7684\u9009\u62e9\uff0c\u56e0\u4e3a\u5b83\u652f\u6301\u900f\u660e\u80cc\u666f\u3002\u5982\u679c\u6587\u4ef6\u5927\u5c0f\u662f\u4e00\u4e2a\u5173\u952e\u56e0\u7d20\uff0cJPEG\u683c\u5f0f\u53ef\u4ee5\u51cf\u5c0f\u6587\u4ef6\u4f53\u79ef\uff0c\u4f46\u53ef\u80fd\u4f1a\u5f71\u54cd\u56fe\u50cf\u8d28\u91cf\u3002<\/p>\n<p><strong>\u5982\u4f55\u4fdd\u5b58\u56fe\u50cf\u65f6\u8c03\u6574\u5206\u8fa8\u7387\uff1f<\/strong><br \/>\u5728\u4f7f\u7528<code>savefig()<\/code>\u51fd\u6570\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e<code>dpi<\/code>\u53c2\u6570\u6765\u8c03\u6574\u56fe\u50cf\u7684\u5206\u8fa8\u7387\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>plt.savefig(&#39;filename.png&#39;, dpi=300)<\/code>\u53ef\u4ee5\u4fdd\u5b58\u9ad8\u5206\u8fa8\u7387\u7684\u56fe\u50cf\uff0c\u9002\u5408\u6253\u5370\u4f7f\u7528\u3002\u8c03\u6574DPI\u503c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5728\u4e0d\u540c\u7684\u8f93\u51fa\u5a92\u4ecb\u4e0a\u83b7\u5f97\u6700\u4f73\u6548\u679c\uff0c\u8bb0\u5f97\u6839\u636e\u9700\u8981\u9009\u62e9\u9002\u5408\u7684DPI\u503c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u7528Python\u628a\u7ed8\u5236\u7684\u56fe\u4fdd\u5b58\u4e0b\u6765\uff0c\u53ef\u4ee5\u4f7f\u7528Matplotlib\u5e93\u3002 Matplotlib\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u7ed8\u56fe\u5e93\uff0c [&hellip;]","protected":false},"author":3,"featured_media":1124305,"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\/1124272"}],"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=1124272"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1124272\/revisions"}],"predecessor-version":[{"id":1124315,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1124272\/revisions\/1124315"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1124305"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1124272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1124272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1124272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}