{"id":1041894,"date":"2024-12-31T12:52:59","date_gmt":"2024-12-31T04:52:59","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1041894.html"},"modified":"2024-12-31T12:53:01","modified_gmt":"2024-12-31T04:53:01","slug":"python%e5%a6%82%e4%bd%95%e6%94%b9%e4%b8%ad%e6%96%87%e5%ad%97%e4%bd%93","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1041894.html","title":{"rendered":"python\u5982\u4f55\u6539\u4e2d\u6587\u5b57\u4f53"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/c1f50e56-3587-4c8d-87ba-fdbd0a620738.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u6539\u4e2d\u6587\u5b57\u4f53\" \/><\/p>\n<p><p> <strong>Python\u4e2d\u6539\u4e2d\u6587\u5b57\u4f53\u7684\u4e3b\u8981\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528matplotlib\u5e93\u3001\u4f7f\u7528PIL\u5e93\u3001\u5728GUI\u5e94\u7528\u4e2d\u6539\u5b57\u4f53\u3002<\/strong>\u5176\u4e2d\uff0c\u4f7f\u7528matplotlib\u5e93\u662f\u6700\u5e38\u89c1\u548c\u7b80\u4fbf\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7matplotlib\u5e93\u53ef\u4ee5\u8f7b\u677e\u8bbe\u7f6e\u56fe\u8868\u4e2d\u7684\u5b57\u4f53\u3002\u9996\u5148\u9700\u8981\u5b89\u88c5matplotlib\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<code>pip install matplotlib<\/code>\u3002\u7136\u540e\u901a\u8fc7<code>matplotlib<\/code>\u7684<code>rcParams<\/code>\u914d\u7f6e\u6765\u8bbe\u7f6e\u4e2d\u6587\u5b57\u4f53\u3002\u5177\u4f53\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p>import matplotlib.font_manager as fm<\/p>\n<h2><strong>\u8bbe\u7f6e\u4e2d\u6587\u5b57\u4f53<\/strong><\/h2>\n<p>plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;]  # \u4f7f\u7528\u9ed1\u4f53<\/p>\n<p>plt.rcParams[&#39;axes.unicode_minus&#39;] = False    # \u89e3\u51b3\u8d1f\u53f7\u663e\u793a\u95ee\u9898<\/p>\n<h2><strong>\u793a\u4f8b\u56fe\u8868<\/strong><\/h2>\n<p>plt.plot([1, 2, 3], [4, 5, 6])<\/p>\n<p>plt.title(&#39;\u4e2d\u6587\u6807\u9898&#39;)<\/p>\n<p>plt.xlabel(&#39;\u6a2a\u8f74&#39;)<\/p>\n<p>plt.ylabel(&#39;\u7eb5\u8f74&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u8bbe\u7f6e\u4e86\u4e2d\u6587\u5b57\u4f53\u4e3a\u9ed1\u4f53\uff0c\u5e76\u89e3\u51b3\u4e86\u8d1f\u53f7\u663e\u793a\u95ee\u9898\u3002\u63a5\u4e0b\u6765\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4ed6\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528matplotlib\u5e93<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528matplotlib\u5e93\u53ef\u4ee5\u65b9\u4fbf\u5730\u5bf9\u56fe\u8868\u4e2d\u7684\u5b57\u4f53\u8fdb\u884c\u8bbe\u7f6e\uff0c\u5305\u62ec\u4e2d\u6587\u5b57\u4f53\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5matplotlib\u5e93<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u786e\u4fdd\u5b89\u88c5\u4e86matplotlib\u5e93\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\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><h4>2. \u8bbe\u7f6e\u5b57\u4f53\u5c5e\u6027<\/h4>\n<\/p>\n<p><p>\u5728\u4f7f\u7528matplotlib\u7ed8\u5236\u56fe\u8868\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7<code>rcParams<\/code>\u5c5e\u6027\u6765\u8bbe\u7f6e\u5b57\u4f53\u3002\u5e38\u7528\u7684\u4e2d\u6587\u5b57\u4f53\u5305\u62ec\u9ed1\u4f53\uff08SimHei\uff09\u3001\u5b8b\u4f53\uff08SimSun\uff09\u7b49\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u8bbe\u7f6e\u4e2d\u6587\u5b57\u4f53<\/strong><\/h2>\n<p>plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;]  # \u4f7f\u7528\u9ed1\u4f53<\/p>\n<p>plt.rcParams[&#39;axes.unicode_minus&#39;] = False    # \u89e3\u51b3\u8d1f\u53f7\u663e\u793a\u95ee\u9898<\/p>\n<h2><strong>\u7ed8\u5236\u793a\u4f8b\u56fe\u8868<\/strong><\/h2>\n<p>plt.plot([1, 2, 3], [4, 5, 6])<\/p>\n<p>plt.title(&#39;\u4e2d\u6587\u6807\u9898&#39;)<\/p>\n<p>plt.xlabel(&#39;\u6a2a\u8f74&#39;)<\/p>\n<p>plt.ylabel(&#39;\u7eb5\u8f74&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u81ea\u5b9a\u4e49\u5b57\u4f53<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u4f7f\u7528\u81ea\u5b9a\u4e49\u5b57\u4f53\uff0c\u53ef\u4ee5\u901a\u8fc7<code>font_manager<\/code>\u6765\u52a0\u8f7d\u5b57\u4f53\u6587\u4ef6\uff0c\u5e76\u5e94\u7528\u5230\u56fe\u8868\u4e2d\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p>import matplotlib.font_manager as fm<\/p>\n<h2><strong>\u52a0\u8f7d\u81ea\u5b9a\u4e49\u5b57\u4f53<\/strong><\/h2>\n<p>font_path = &#39;path\/to\/your\/font.ttf&#39;  # \u5b57\u4f53\u6587\u4ef6\u8def\u5f84<\/p>\n<p>my_font = fm.FontProperties(fname=font_path)<\/p>\n<h2><strong>\u7ed8\u5236\u793a\u4f8b\u56fe\u8868<\/strong><\/h2>\n<p>plt.plot([1, 2, 3], [4, 5, 6])<\/p>\n<p>plt.title(&#39;\u81ea\u5b9a\u4e49\u5b57\u4f53\u6807\u9898&#39;, fontproperties=my_font)<\/p>\n<p>plt.xlabel(&#39;\u6a2a\u8f74&#39;, fontproperties=my_font)<\/p>\n<p>plt.ylabel(&#39;\u7eb5\u8f74&#39;, fontproperties=my_font)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528PIL\u5e93<\/h3>\n<\/p>\n<p><p>PIL\uff08Python Imaging Library\uff09\u5e93\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5904\u7406\u56fe\u50cf\uff0c\u5e76\u5728\u56fe\u50cf\u4e0a\u7ed8\u5236\u4e2d\u6587\u6587\u672c\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5PIL\u5e93<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u786e\u4fdd\u5b89\u88c5\u4e86PIL\u5e93\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\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 pillow<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u7ed8\u5236\u4e2d\u6587\u6587\u672c<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528PIL\u5e93\u7684<code>ImageDraw<\/code>\u6a21\u5757\u53ef\u4ee5\u5728\u56fe\u50cf\u4e0a\u7ed8\u5236\u4e2d\u6587\u6587\u672c\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PIL import Image, ImageDraw, ImageFont<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u7a7a\u767d\u56fe\u50cf<\/strong><\/h2>\n<p>image = Image.new(&#39;RGB&#39;, (200, 100), (255, 255, 255))<\/p>\n<h2><strong>\u52a0\u8f7d\u5b57\u4f53<\/strong><\/h2>\n<p>font_path = &#39;path\/to\/your\/font.ttf&#39;  # \u5b57\u4f53\u6587\u4ef6\u8def\u5f84<\/p>\n<p>font = ImageFont.truetype(font_path, 36)<\/p>\n<h2><strong>\u521b\u5efa\u7ed8\u56fe\u5bf9\u8c61<\/strong><\/h2>\n<p>draw = ImageDraw.Draw(image)<\/p>\n<h2><strong>\u7ed8\u5236\u4e2d\u6587\u6587\u672c<\/strong><\/h2>\n<p>text = &quot;\u4e2d\u6587\u5b57\u4f53&quot;<\/p>\n<p>draw.text((10, 10), text, font=font, fill=(0, 0, 0))<\/p>\n<h2><strong>\u663e\u793a\u56fe\u50cf<\/strong><\/h2>\n<p>image.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5728GUI\u5e94\u7528\u4e2d\u6539\u5b57\u4f53<\/h3>\n<\/p>\n<p><p>\u5728GUI\u5e94\u7528\u4e2d\uff0c\u4f8b\u5982\u4f7f\u7528Tkinter\u3001PyQt\u7b49\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u5b57\u4f53\u5c5e\u6027\u6765\u66f4\u6539\u4e2d\u6587\u5b57\u4f53\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528Tkinter<\/h4>\n<\/p>\n<p><p>Tkinter\u662fPython\u5185\u7f6e\u7684GUI\u5e93\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8bbe\u7f6e\u4e2d\u6587\u5b57\u4f53\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>from tkinter import font<\/p>\n<h2><strong>\u521b\u5efa\u4e3b\u7a97\u53e3<\/strong><\/h2>\n<p>root = tk.Tk()<\/p>\n<h2><strong>\u8bbe\u7f6e\u4e2d\u6587\u5b57\u4f53<\/strong><\/h2>\n<p>my_font = font.Font(family=&#39;SimHei&#39;, size=12)<\/p>\n<h2><strong>\u521b\u5efa\u6807\u7b7e\u5e76\u8bbe\u7f6e\u5b57\u4f53<\/strong><\/h2>\n<p>label = tk.Label(root, text=&#39;\u4e2d\u6587\u5b57\u4f53&#39;, font=my_font)<\/p>\n<p>label.pack()<\/p>\n<h2><strong>\u8fd0\u884c\u4e3b\u5faa\u73af<\/strong><\/h2>\n<p>root.m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>nloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528PyQt<\/h4>\n<\/p>\n<p><p>PyQt\u662fPython\u7684\u53e6\u4e00\u79cd\u5e38\u7528GUI\u5e93\uff0c\u901a\u8fc7\u8bbe\u7f6eQFont\u5c5e\u6027\u53ef\u4ee5\u66f4\u6539\u5b57\u4f53\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PyQt5.QtWidgets import QApplication, QLabel<\/p>\n<p>from PyQt5.QtGui import QFont<\/p>\n<h2><strong>\u521b\u5efa\u5e94\u7528\u7a0b\u5e8f<\/strong><\/h2>\n<p>app = QApplication([])<\/p>\n<h2><strong>\u521b\u5efa\u6807\u7b7e<\/strong><\/h2>\n<p>label = QLabel(&#39;\u4e2d\u6587\u5b57\u4f53&#39;)<\/p>\n<h2><strong>\u8bbe\u7f6e\u5b57\u4f53<\/strong><\/h2>\n<p>font = QFont(&#39;SimHei&#39;, 12)<\/p>\n<p>label.setFont(font)<\/p>\n<h2><strong>\u663e\u793a\u6807\u7b7e<\/strong><\/h2>\n<p>label.show()<\/p>\n<h2><strong>\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f<\/strong><\/h2>\n<p>app.exec_()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0a\u4ecb\u7ecd\u4e86\u5728Python\u4e2d\u66f4\u6539\u4e2d\u6587\u5b57\u4f53\u7684\u51e0\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528matplotlib\u5e93\u3001PIL\u5e93\u548c\u5728GUI\u5e94\u7528\u4e2d\u6539\u5b57\u4f53\u3002\u4f7f\u7528matplotlib\u5e93\u53ef\u4ee5\u65b9\u4fbf\u5730\u5bf9\u56fe\u8868\u4e2d\u7684\u5b57\u4f53\u8fdb\u884c\u8bbe\u7f6e\uff0c\u800cPIL\u5e93\u5219\u53ef\u4ee5\u5728\u56fe\u50cf\u4e0a\u7ed8\u5236\u4e2d\u6587\u6587\u672c\u3002\u5728GUI\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u5b57\u4f53\u5c5e\u6027\u6765\u66f4\u6539\u4e2d\u6587\u5b57\u4f53\u3002\u4e0d\u540c\u7684\u65b9\u6cd5\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u573a\u666f\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4fee\u6539\u4e2d\u6587\u5b57\u4f53\u4ee5\u9002\u5e94\u4e0d\u540c\u7684\u7ed8\u56fe\u9700\u6c42\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u7279\u522b\u662f\u5728\u4f7f\u7528Matplotlib\u8fdb\u884c\u56fe\u5f62\u7ed8\u5236\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u5b57\u4f53\u5c5e\u6027\u6765\u6539\u53d8\u4e2d\u6587\u5b57\u4f53\u3002\u53ef\u4ee5\u4f7f\u7528<code>matplotlib.font_manager<\/code>\u5e93\u6765\u6307\u5b9a\u6240\u9700\u7684\u4e2d\u6587\u5b57\u4f53\u3002\u9996\u5148\uff0c\u786e\u4fdd\u76ee\u6807\u5b57\u4f53\u5df2\u7ecf\u5b89\u88c5\u5728\u7cfb\u7edf\u4e2d\uff0c\u7136\u540e\u901a\u8fc7\u4ee5\u4e0b\u4ee3\u7801\u8bbe\u7f6e\u5b57\u4f53\uff1a<\/p>\n<pre><code class=\"language-python\">import matplotlib.pyplot as plt\nfrom matplotlib.font_manager import FontProperties\n\nfont = FontProperties(fname=&#39;\/path\/to\/your\/font.ttf&#39;)  # \u66ff\u6362\u4e3a\u4f60\u7684\u5b57\u4f53\u8def\u5f84\nplt.title(&#39;\u6807\u9898&#39;, fontproperties=font)\nplt.xlabel(&#39;\u6a2a\u8f74&#39;, fontproperties=font)\nplt.ylabel(&#39;\u7eb5\u8f74&#39;, fontproperties=font)\n<\/code><\/pre>\n<p><strong>\u5728Python\u4e2d\u4f7f\u7528Pandas\u65f6\u5982\u4f55\u4fdd\u8bc1\u4e2d\u6587\u6570\u636e\u80fd\u591f\u6b63\u786e\u663e\u793a\uff1f<\/strong><br \/>\u4f7f\u7528Pandas\u5904\u7406\u4e2d\u6587\u6570\u636e\u65f6\uff0c\u786e\u4fdd\u5728\u8bfb\u53d6\u548c\u663e\u793a\u6570\u636e\u65f6\u4f7f\u7528\u6b63\u786e\u7684\u7f16\u7801\u683c\u5f0f\u3002\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u6307\u5b9a<code>encoding=&#39;utf-8&#39;<\/code>\u6216<code>encoding=&#39;gbk&#39;<\/code>\uff08\u6839\u636e\u6587\u4ef6\u7684\u5b9e\u9645\u7f16\u7801\uff09\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">import pandas as pd\n\ndf = pd.read_csv(&#39;data.csv&#39;, encoding=&#39;utf-8&#39;)  # \u6839\u636e\u6587\u4ef6\u5b9e\u9645\u7f16\u7801\u9009\u62e9\nprint(df)\n<\/code><\/pre>\n<p>\u6b64\u5916\uff0c\u8f93\u51fa\u5230Excel\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>to_excel<\/code>\u65b9\u6cd5\u5e76\u786e\u4fdd\u5b57\u4f53\u652f\u6301\u4e2d\u6587\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u5728Python\u4e2d\u4e3a\u4e0d\u540c\u7684\u56fe\u8868\u9009\u62e9\u4e0d\u540c\u7684\u4e2d\u6587\u5b57\u4f53\uff1f<\/strong><br \/>\u662f\u7684\uff0cPython\u5141\u8bb8\u4e3a\u6bcf\u4e2a\u56fe\u8868\u5355\u72ec\u8bbe\u7f6e\u5b57\u4f53\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u5728\u7ed8\u5236\u6bcf\u4e2a\u56fe\u8868\u65f6\u6307\u5b9a<code>fontproperties<\/code>\u53c2\u6570\u6765\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u521b\u5efa\u591a\u4e2a\u56fe\u8868\u5e76\u4e3a\u6bcf\u4e2a\u56fe\u8868\u8bbe\u7f6e\u4e0d\u540c\u7684\u5b57\u4f53\uff0c\u4f7f\u5176\u9002\u5408\u4e0d\u540c\u7684\u98ce\u683c\u6216\u4e3b\u9898\uff1a<\/p>\n<pre><code class=\"language-python\">plt.figure()\nplt.plot(data)\nplt.title(&#39;\u56fe\u88681&#39;, fontproperties=font1)  # font1\u4e3a\u7b2c\u4e00\u4e2a\u5b57\u4f53\nplt.show()\n\nplt.figure()\nplt.bar(data)\nplt.title(&#39;\u56fe\u88682&#39;, fontproperties=font2)  # font2\u4e3a\u7b2c\u4e8c\u4e2a\u5b57\u4f53\nplt.show()\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u7075\u6d3b\u6027\u4f7f\u5f97\u8bbe\u8ba1\u548c\u5c55\u793a\u7684\u6548\u679c\u66f4\u52a0\u4e30\u5bcc\u591a\u5f69\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u6539\u4e2d\u6587\u5b57\u4f53\u7684\u4e3b\u8981\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528matplotlib\u5e93\u3001\u4f7f\u7528PIL\u5e93\u3001\u5728GUI\u5e94\u7528\u4e2d\u6539\u5b57\u4f53\u3002\u5176\u4e2d\uff0c\u4f7f [&hellip;]","protected":false},"author":3,"featured_media":1041906,"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\/1041894"}],"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=1041894"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1041894\/revisions"}],"predecessor-version":[{"id":1041910,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1041894\/revisions\/1041910"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1041906"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1041894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1041894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1041894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}