{"id":972966,"date":"2024-12-27T05:53:02","date_gmt":"2024-12-26T21:53:02","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/972966.html"},"modified":"2024-12-27T05:53:04","modified_gmt":"2024-12-26T21:53:04","slug":"python%e7%94%bb%e5%9b%be-%e5%a6%82%e4%bd%95%e4%bf%9d%e5%ad%98%e5%9b%be%e7%89%87","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/972966.html","title":{"rendered":"python\u753b\u56fe \u5982\u4f55\u4fdd\u5b58\u56fe\u7247"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24195352\/851f3ec5-99c7-413f-a8a1-ba82412f5da4.webp\" alt=\"python\u753b\u56fe \u5982\u4f55\u4fdd\u5b58\u56fe\u7247\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u4fdd\u5b58\u56fe\u7247\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528Matplotlib\u7684<code>savefig()<\/code>\u51fd\u6570\u3001PIL\u5e93\u7684<code>save()<\/code>\u65b9\u6cd5\u3001\u4ee5\u53caSeaborn\u548cPlotly\u7b49\u53ef\u89c6\u5316\u5e93\u7684\u81ea\u5e26\u4fdd\u5b58\u529f\u80fd\u3002\u5176\u4e2d\uff0c\u4f7f\u7528Matplotlib\u7684<code>savefig()<\/code>\u51fd\u6570\u662f\u6700\u5e38\u89c1\u4e14\u7b80\u5355\u7684\u65b9\u6cd5\u3002<\/strong>\u4e3a\u4e86\u8be6\u7ec6\u63cf\u8ff0\u8fd9\u4e00\u70b9\uff0c\u6211\u4eec\u6765\u770b\u770b\u5982\u4f55\u4f7f\u7528Matplotlib\u4fdd\u5b58\u56fe\u50cf\u3002Matplotlib\u662fPython\u4e2d\u6700\u53d7\u6b22\u8fce\u7684\u7ed8\u56fe\u5e93\u4e4b\u4e00\uff0c\u901a\u8fc7\u8c03\u7528<code>savefig()<\/code>\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u5c06\u56fe\u50cf\u4fdd\u5b58\u4e3a\u591a\u79cd\u683c\u5f0f\uff0c\u5982PNG\u3001JPEG\u3001SVG\u7b49\u3002\u4f60\u53ea\u9700\u5728\u7ed8\u5236\u5b8c\u56fe\u50cf\u540e\uff0c\u8c03\u7528<code>plt.savefig(&#39;filename.png&#39;)<\/code>\u5373\u53ef\uff0c\u8fd9\u5c06\u628a\u5f53\u524d\u56fe\u5f62\u5bf9\u8c61\u4fdd\u5b58\u5230\u6307\u5b9a\u8def\u5f84\u3002\u73b0\u5728\uff0c\u8ba9\u6211\u4eec\u6df1\u5165\u63a2\u8ba8Python\u4e2d\u4fdd\u5b58\u56fe\u7247\u7684\u4e0d\u540c\u65b9\u6cd5\u548c\u6280\u5de7\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001MATPLOTLIB\u4fdd\u5b58\u56fe\u7247<\/p>\n<\/p>\n<p><p>Matplotlib\u662f\u4e00\u79cd\u5f3a\u5927\u76842D\u7ed8\u56fe\u5e93\uff0c\u5e7f\u6cdb\u7528\u4e8ePython\u4e2d\u7ed8\u5236\u5404\u79cd\u56fe\u5f62\u3002\u4fdd\u5b58\u56fe\u7247\u662fMatplotlib\u7684\u4e00\u9879\u57fa\u672c\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528<code>savefig()<\/code>\u51fd\u6570<\/li>\n<\/ol>\n<p><p><code>savefig()<\/code>\u662fMatplotlib\u4e2d\u7528\u4e8e\u4fdd\u5b58\u56fe\u50cf\u7684\u6838\u5fc3\u51fd\u6570\u3002\u5b83\u5141\u8bb8\u4f60\u4fdd\u5b58\u7ed8\u5236\u7684\u56fe\u5f62\u4e3a\u591a\u79cd\u683c\u5f0f\uff0c\u5305\u62ecPNG\u3001PDF\u3001SVG\u7b49\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u57fa\u672c\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u521b\u5efa\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4]<\/p>\n<p>y = [10, 20, 25, 30]<\/p>\n<h2><strong>\u7ed8\u5236\u56fe\u5f62<\/strong><\/h2>\n<p>plt.plot(x, y)<\/p>\n<h2><strong>\u4fdd\u5b58\u56fe\u50cf<\/strong><\/h2>\n<p>plt.savefig(&#39;my_plot.png&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>savefig()<\/code>\u51fd\u6570\u5c06\u56fe\u50cf\u4fdd\u5b58\u4e3aPNG\u683c\u5f0f\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u66f4\u6539\u6587\u4ef6\u6269\u5c55\u540d\u6765\u4fdd\u5b58\u4e3a\u5176\u4ed6\u683c\u5f0f\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u8c03\u6574\u56fe\u50cf\u8d28\u91cf\u4e0e\u5927\u5c0f<\/li>\n<\/ol>\n<p><p>\u5728\u4fdd\u5b58\u56fe\u7247\u65f6\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u63a7\u5236\u56fe\u50cf\u7684\u8d28\u91cf\u548c\u5927\u5c0f\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7<code>dpi<\/code>\uff08\u6bcf\u82f1\u5bf8\u70b9\u6570\uff09\u548c<code>figsize<\/code>\u53c2\u6570\u6765\u5b9e\u73b0\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">plt.savefig(&#39;my_plot.png&#39;, dpi=300, bbox_inches=&#39;tight&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u547d\u4ee4\u4e2d\uff0c<code>dpi=300<\/code>\u8bbe\u7f6e\u4e86\u56fe\u50cf\u7684\u5206\u8fa8\u7387\uff0c<code>bbox_inches=&#39;tight&#39;<\/code>\u5219\u53bb\u9664\u4e86\u56fe\u50cf\u5468\u56f4\u7684\u7a7a\u767d\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528PIL\u4fdd\u5b58\u56fe\u7247<\/p>\n<\/p>\n<p><p>PIL\uff08Python Imaging Library\uff09\u662f\u4e00\u4e2a\u7528\u4e8e\u56fe\u50cf\u5904\u7406\u7684\u5e93\uff0c\u867d\u7136\u5b83\u4e0d\u662f\u4e13\u95e8\u7528\u4e8e\u7ed8\u56fe\uff0c\u4f46\u53ef\u4ee5\u7528\u4e8e\u4fdd\u5b58\u56fe\u50cf\u3002<\/p>\n<\/p>\n<ol>\n<li>\u57fa\u672c\u4f7f\u7528<\/li>\n<\/ol>\n<p><p>PIL\u63d0\u4f9b\u4e86\u7b80\u5355\u7684\u65b9\u6cd5\u6765\u6253\u5f00\u3001\u5904\u7406\u548c\u4fdd\u5b58\u56fe\u50cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PIL import Image<\/p>\n<h2><strong>\u6253\u5f00\u4e00\u4e2a\u56fe\u50cf<\/strong><\/h2>\n<p>img = Image.open(&#39;example.jpg&#39;)<\/p>\n<h2><strong>\u4fdd\u5b58\u56fe\u50cf<\/strong><\/h2>\n<p>img.save(&#39;example_copy.jpg&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u56fe\u50cf\u683c\u5f0f\u8f6c\u6362<\/li>\n<\/ol>\n<p><p>PIL\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5728\u4e0d\u540c\u56fe\u50cf\u683c\u5f0f\u4e4b\u95f4\u8f6c\u6362\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">img.save(&#39;example.png&#39;, &#39;PNG&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b64\u65b9\u6cd5\u53ef\u4ee5\u5c06\u56fe\u50cf\u4fdd\u5b58\u4e3aPNG\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001SEABORN\u4fdd\u5b58\u56fe\u7247<\/p>\n<\/p>\n<p><p>Seaborn\u662f\u57fa\u4e8eMatplotlib\u6784\u5efa\u7684\u9ad8\u7ea7\u6570\u636e\u53ef\u89c6\u5316\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u66f4\u4e3a\u7f8e\u89c2\u548c\u7b80\u6d01\u7684\u7ed8\u56fe\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528<code>savefig()<\/code>\u51fd\u6570<\/li>\n<\/ol>\n<p><p>Seaborn\u4e0eMatplotlib\u7d27\u5bc6\u96c6\u6210\uff0c\u56e0\u6b64\u53ef\u4ee5\u4f7f\u7528Matplotlib\u7684<code>savefig()<\/code>\u65b9\u6cd5\u6765\u4fdd\u5b58\u56fe\u50cf\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>\u521b\u5efa\u6570\u636e<\/strong><\/h2>\n<p>data = sns.load_dataset(&#39;iris&#39;)<\/p>\n<h2><strong>\u7ed8\u5236\u56fe\u5f62<\/strong><\/h2>\n<p>sns.scatterplot(x=&#39;sepal_length&#39;, y=&#39;sepal_width&#39;, data=data)<\/p>\n<h2><strong>\u4fdd\u5b58\u56fe\u50cf<\/strong><\/h2>\n<p>plt.savefig(&#39;seaborn_plot.png&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u8c03\u6574\u98ce\u683c\u4e0e\u683c\u5f0f<\/li>\n<\/ol>\n<p><p>Seaborn\u5141\u8bb8\u4f60\u8f7b\u677e\u5730\u8bbe\u7f6e\u56fe\u50cf\u98ce\u683c\uff0c\u5728\u4fdd\u5b58\u56fe\u50cf\u65f6\uff0c\u786e\u4fdd\u56fe\u50cf\u7684\u7f8e\u89c2\u6027\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">sns.set(style=&#39;whitegrid&#39;)<\/p>\n<h2><strong>\u7ed8\u5236\u56fe\u5f62<\/strong><\/h2>\n<p>sns.scatterplot(x=&#39;sepal_length&#39;, y=&#39;sepal_width&#39;, data=data)<\/p>\n<h2><strong>\u4fdd\u5b58\u56fe\u50cf<\/strong><\/h2>\n<p>plt.savefig(&#39;seaborn_plot_styled.png&#39;, dpi=300)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528PLOTLY\u4fdd\u5b58\u56fe\u7247<\/p>\n<\/p>\n<p><p>Plotly\u662f\u4e00\u4e2a\u7528\u4e8e\u521b\u5efa\u4ea4\u4e92\u5f0f\u56fe\u5f62\u7684\u5e93\uff0c\u5b83\u5141\u8bb8\u4fdd\u5b58\u56fe\u50cf\u4e3a\u9759\u6001\u6587\u4ef6\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5bfc\u51fa\u4e3a\u56fe\u50cf\u6587\u4ef6<\/li>\n<\/ol>\n<p><p>Plotly\u63d0\u4f9b\u4e86\u5bfc\u51fa\u9759\u6001\u56fe\u50cf\u7684\u529f\u80fd\uff0c\u867d\u7136\u5b83\u4e3b\u8981\u7528\u4e8e\u4ea4\u4e92\u5f0f\u56fe\u5f62\uff0c\u4f46\u4e5f\u652f\u6301\u9759\u6001\u56fe\u50cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import plotly.express as px<\/p>\n<h2><strong>\u521b\u5efa\u6570\u636e<\/strong><\/h2>\n<p>df = px.data.iris()<\/p>\n<h2><strong>\u7ed8\u5236\u56fe\u5f62<\/strong><\/h2>\n<p>fig = px.scatter(df, x=&#39;sepal_width&#39;, y=&#39;sepal_length&#39;)<\/p>\n<h2><strong>\u4fdd\u5b58\u56fe\u50cf<\/strong><\/h2>\n<p>fig.write_image(&#39;plotly_plot.png&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u5b89\u88c5\u6240\u9700\u4f9d\u8d56<\/li>\n<\/ol>\n<p><p>\u8981\u4f7f\u7528Plotly\u7684\u56fe\u50cf\u5bfc\u51fa\u529f\u80fd\uff0c\u4f60\u9700\u8981\u5b89\u88c5<code>kaleido<\/code>\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install kaleido<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u4fdd\u5b58\u56fe\u7247\u7684\u6700\u4f73\u5b9e\u8df5<\/p>\n<\/p>\n<p><p>\u5728\u4fdd\u5b58\u56fe\u7247\u65f6\uff0c\u6709\u4e00\u4e9b\u6700\u4f73\u5b9e\u8df5\u53ef\u4ee5\u5e2e\u52a9\u4f60\u83b7\u5f97\u66f4\u597d\u7684\u56fe\u50cf\u8d28\u91cf\u548c\u53ef\u7528\u6027\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528\u9ad8\u5206\u8fa8\u7387<\/li>\n<\/ol>\n<p><p>\u9ad8DPI\u8bbe\u7f6e\u53ef\u4ee5\u786e\u4fdd\u56fe\u50cf\u5728\u9ad8\u8d28\u91cf\u6253\u5370\u65f6\u770b\u8d77\u6765\u6e05\u6670\uff0c\u8fd9\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u5c24\u5176\u662f\u5728\u5236\u4f5c\u4e13\u4e1a\u62a5\u544a\u6216\u51fa\u7248\u7269\u65f6\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u9009\u62e9\u5408\u9002\u7684\u56fe\u50cf\u683c\u5f0f<\/li>\n<\/ol>\n<p><p>\u4e0d\u540c\u7684\u683c\u5f0f\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u7528\u9014\u3002PNG\u9002\u7528\u4e8e\u9700\u8981\u900f\u660e\u80cc\u666f\u7684\u56fe\u7247\uff0cJPEG\u9002\u7528\u4e8e\u538b\u7f29\u8f83\u5c0f\u4f46\u8d28\u91cf\u4e0d\u5982PNG\u7684\u56fe\u7247\uff0c\u800cSVG\u9002\u7528\u4e8e\u53ef\u7f29\u653e\u7684\u77e2\u91cf\u56fe\u5f62\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li>\u4fdd\u6301\u6587\u4ef6\u7ed3\u6784\u7684\u6574\u6d01<\/li>\n<\/ol>\n<p><p>\u5728\u9879\u76ee\u4e2d\u7ec4\u7ec7\u56fe\u50cf\u6587\u4ef6\u5939\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7ba1\u7406\u548c\u67e5\u627e\u56fe\u50cf\uff0c\u7279\u522b\u662f\u5728\u5927\u578b\u9879\u76ee\u4e2d\u3002<\/p>\n<\/p>\n<ol start=\"4\">\n<li>\u6ce8\u91ca\u4e0e\u6587\u6863<\/li>\n<\/ol>\n<p><p>\u5728\u4ee3\u7801\u4e2d\u6dfb\u52a0\u6ce8\u91ca\uff0c\u8bf4\u660e\u56fe\u50cf\u7684\u4fdd\u5b58\u65b9\u5f0f\u548c\u7528\u9014\uff0c\u8fd9\u6709\u52a9\u4e8e\u5c06\u6765\u7ef4\u62a4\u548c\u66f4\u65b0\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u7406\u89e3\u548c\u5e94\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u5728Python\u4e2d\u9ad8\u6548\u5730\u4fdd\u5b58\u56fe\u50cf\uff0c\u5e76\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5e93\u548c\u8bbe\u7f6e\u3002\u8fd9\u4e0d\u4ec5\u63d0\u5347\u4e86\u4f60\u7684\u6570\u636e\u53ef\u89c6\u5316\u6280\u80fd\uff0c\u8fd8\u80fd\u4e3a\u4f60\u7684\u9879\u76ee\u589e\u6dfb\u4e13\u4e1a\u6027\u548c\u7f8e\u89c2\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4fdd\u5b58\u7ed8\u5236\u7684\u56fe\u50cf\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u4f7f\u7528Matplotlib\u5e93\u7ed8\u5236\u56fe\u50cf\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528<code>savefig()<\/code>\u51fd\u6570\u5c06\u56fe\u50cf\u4fdd\u5b58\u5230\u672c\u5730\u3002\u4f60\u53ef\u4ee5\u6307\u5b9a\u6587\u4ef6\u540d\u548c\u6587\u4ef6\u683c\u5f0f\uff08\u5982PNG\u3001JPEG\u7b49\uff09\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>plt.savefig(&#39;my_plot.png&#39;)<\/code>\u53ef\u4ee5\u5c06\u5f53\u524d\u7ed8\u56fe\u4fdd\u5b58\u4e3aPNG\u683c\u5f0f\u3002<\/p>\n<p><strong>\u4fdd\u5b58\u56fe\u50cf\u65f6\u53ef\u4ee5\u9009\u62e9\u54ea\u4e9b\u6587\u4ef6\u683c\u5f0f\uff1f<\/strong><br \/>Python\u7684Matplotlib\u5e93\u652f\u6301\u591a\u79cd\u6587\u4ef6\u683c\u5f0f\uff0c\u5305\u62ecPNG\u3001JPEG\u3001SVG\u3001PDF\u7b49\u3002\u9009\u62e9\u5408\u9002\u7684\u6587\u4ef6\u683c\u5f0f\u53ef\u4ee5\u6839\u636e\u56fe\u50cf\u7684\u7528\u9014\u6765\u51b3\u5b9a\uff0c\u4f8b\u5982\uff0cPNG\u9002\u5408\u7528\u4e8e\u7f51\u9875\uff0c\u800cPDF\u5219\u9002\u7528\u4e8e\u9ad8\u8d28\u91cf\u6253\u5370\u3002<\/p>\n<p><strong>\u5728\u4fdd\u5b58\u56fe\u50cf\u65f6\u5982\u4f55\u8c03\u6574\u56fe\u50cf\u7684\u5206\u8fa8\u7387\uff1f<\/strong><br \/>\u5728\u4f7f\u7528<code>savefig()<\/code>\u51fd\u6570\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7<code>dpi<\/code>\u53c2\u6570\u6765\u8bbe\u7f6e\u56fe\u50cf\u7684\u5206\u8fa8\u7387\u3002\u4f8b\u5982\uff0c<code>plt.savefig(&#39;my_plot.png&#39;, dpi=300)<\/code>\u53ef\u4ee5\u5c06\u56fe\u50cf\u7684\u5206\u8fa8\u7387\u8bbe\u7f6e\u4e3a300 DPI\uff0c\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u56fe\u50cf\u5728\u6253\u5370\u65f6\u4fdd\u6301\u8f83\u9ad8\u7684\u6e05\u6670\u5ea6\u3002<\/p>\n<p><strong>\u5982\u4f55\u4fdd\u5b58\u5e76\u540c\u65f6\u663e\u793a\u56fe\u50cf\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u540c\u65f6\u4fdd\u5b58\u548c\u663e\u793a\u56fe\u50cf\uff0c\u53ef\u4ee5\u5728\u8c03\u7528<code>plt.show()<\/code>\u4e4b\u524d\u4f7f\u7528<code>plt.savefig()<\/code>\u4fdd\u5b58\u56fe\u50cf\u3002\u4f8b\u5982\uff0c<code>plt.savefig(&#39;my_plot.png&#39;)<\/code>\u540e\u63a5<code>plt.show()<\/code>\uff0c\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u56fe\u50cf\u88ab\u4fdd\u5b58\uff0c\u540c\u65f6\u4e5f\u80fd\u5728\u5c4f\u5e55\u4e0a\u663e\u793a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u4fdd\u5b58\u56fe\u7247\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528Matplotlib\u7684savefig()\u51fd\u6570\u3001PIL\u5e93\u7684save()\u65b9\u6cd5 [&hellip;]","protected":false},"author":3,"featured_media":972973,"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\/972966"}],"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=972966"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/972966\/revisions"}],"predecessor-version":[{"id":972976,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/972966\/revisions\/972976"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/972973"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=972966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=972966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=972966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}