{"id":972697,"date":"2024-12-27T05:50:48","date_gmt":"2024-12-26T21:50:48","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/972697.html"},"modified":"2024-12-27T05:50:50","modified_gmt":"2024-12-26T21:50:50","slug":"python%e7%bb%98%e5%9b%be%e5%a6%82%e4%bd%95%e4%bf%ae%e6%94%b9xticks","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/972697.html","title":{"rendered":"python\u7ed8\u56fe\u5982\u4f55\u4fee\u6539xticks"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24195226\/1cb34402-a060-456d-8260-4a32c4365c08.webp\" alt=\"python\u7ed8\u56fe\u5982\u4f55\u4fee\u6539xticks\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u4fee\u6539xticks\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Matplotlib\u5e93\u6765\u5b9e\u73b0\u3002<strong>\u4f7f\u7528Matplotlib\u5e93\u7684<code>xticks()<\/code>\u51fd\u6570\u53ef\u4ee5\u4fee\u6539x\u8f74\u523b\u5ea6\u3001\u901a\u8fc7\u4f20\u9012\u523b\u5ea6\u7684\u4f4d\u7f6e\u5217\u8868\u548c\u6807\u7b7e\u5217\u8868\uff0c\u53ef\u4ee5\u81ea\u5b9a\u4e49\u523b\u5ea6\u7684\u4f4d\u7f6e\u548c\u663e\u793a\u6587\u672c<\/strong>\u3001\u800c<code>set_xticks()<\/code>\u548c<code>set_xticklabels()<\/code>\u65b9\u6cd5\u63d0\u4f9b\u4e86\u66f4\u7cbe\u7ec6\u7684\u523b\u5ea6\u63a7\u5236\u3002\u6211\u4eec\u5c06\u8be6\u7ec6\u8ba8\u8bba\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u4e3a\u60a8\u63d0\u4f9b\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u7684\u793a\u4f8b\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001MATPLOTLIB\u5e93\u7b80\u4ecb<\/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\u751f\u6210\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u5f62\u548c\u56fe\u8868\u3002\u901a\u8fc7Matplotlib\uff0c\u7528\u6237\u53ef\u4ee5\u8f7b\u677e\u5730\u521b\u5efa\u51fa\u8272\u7684\u6570\u636e\u53ef\u89c6\u5316\u6548\u679c\u3002Matplotlib\u7684\u6838\u5fc3\u7ec4\u4ef6\u4e4b\u4e00\u662fpyplot\u6a21\u5757\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u7ec4\u547d\u4ee4\u6837\u5f0f\u7684\u51fd\u6570\uff0c\u5141\u8bb8\u7528\u6237\u8f7b\u677e\u521b\u5efa\u56fe\u8868\u5e76\u8fdb\u884c\u81ea\u5b9a\u4e49\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528XTICKS\u51fd\u6570<\/p>\n<\/p>\n<p><p><code>xticks()<\/code>\u51fd\u6570\u662fMatplotlib\u4e2d\u7528\u4e8e\u81ea\u5b9a\u4e49x\u8f74\u523b\u5ea6\u7684\u57fa\u672c\u65b9\u6cd5\u3002\u901a\u8fc7<code>xticks()<\/code>\uff0c\u7528\u6237\u53ef\u4ee5\u6307\u5b9a\u523b\u5ea6\u7684\u4f4d\u7f6e\uff0c\u5e76\u4e3a\u6bcf\u4e2a\u523b\u5ea6\u8bbe\u7f6e\u6807\u7b7e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [10, 15, 20, 25, 30]<\/p>\n<p>plt.plot(x, y)<\/p>\n<h2><strong>\u81ea\u5b9a\u4e49x\u8f74\u523b\u5ea6\u4f4d\u7f6e\u548c\u6807\u7b7e<\/strong><\/h2>\n<p>plt.xticks([1, 3, 5], [&#39;One&#39;, &#39;Three&#39;, &#39;Five&#39;])<\/p>\n<p>plt.xlabel(&#39;X Axis&#39;)<\/p>\n<p>plt.ylabel(&#39;Y Axis&#39;)<\/p>\n<p>plt.title(&#39;Example Plot&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>xticks()<\/code>\u51fd\u6570\uff0c\u5c06x\u8f74\u7684\u523b\u5ea6\u4f4d\u7f6e\u8bbe\u7f6e\u4e3a1\u30013\u30015\uff0c\u5e76\u4e3a\u8fd9\u4e9b\u4f4d\u7f6e\u5206\u522b\u8bbe\u7f6e\u6807\u7b7e&#39;One&#39;\u3001&#39;Three&#39;\u3001&#39;Five&#39;\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528SET_XTICKS\u548cSET_XTICKLABELS\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u9664\u4e86<code>xticks()<\/code>\u51fd\u6570\uff0cMatplotlib\u8fd8\u63d0\u4f9b\u4e86<code>set_xticks()<\/code>\u548c<code>set_xticklabels()<\/code>\u65b9\u6cd5\uff0c\u5141\u8bb8\u7528\u6237\u5bf9x\u8f74\u523b\u5ea6\u8fdb\u884c\u66f4\u7ec6\u81f4\u7684\u63a7\u5236\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><code>set_xticks()<\/code>\u65b9\u6cd5\uff1a\u7528\u4e8e\u8bbe\u7f6ex\u8f74\u523b\u5ea6\u7684\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><code>set_xticklabels()<\/code>\u65b9\u6cd5\uff1a\u7528\u4e8e\u8bbe\u7f6ex\u8f74\u523b\u5ea6\u7684\u6807\u7b7e\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [10, 15, 20, 25, 30]<\/p>\n<p>fig, ax = plt.subplots()<\/p>\n<p>ax.plot(x, y)<\/p>\n<h2><strong>\u81ea\u5b9a\u4e49x\u8f74\u523b\u5ea6\u4f4d\u7f6e\u548c\u6807\u7b7e<\/strong><\/h2>\n<p>ax.set_xticks([1, 2, 3, 4, 5])<\/p>\n<p>ax.set_xticklabels([&#39;One&#39;, &#39;Two&#39;, &#39;Three&#39;, &#39;Four&#39;, &#39;Five&#39;])<\/p>\n<p>ax.set_xlabel(&#39;X Axis&#39;)<\/p>\n<p>ax.set_ylabel(&#39;Y Axis&#39;)<\/p>\n<p>ax.set_title(&#39;Example Plot with Subplots&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>set_xticks()<\/code>\u65b9\u6cd5\u8bbe\u7f6e\u523b\u5ea6\u4f4d\u7f6e\u4e3a1\u30012\u30013\u30014\u30015\uff0c\u5e76\u4f7f\u7528<code>set_xticklabels()<\/code>\u65b9\u6cd5\u4e3a\u8fd9\u4e9b\u523b\u5ea6\u8bbe\u7f6e\u6807\u7b7e&#39;One&#39;\u3001&#39;Two&#39;\u3001&#39;Three&#39;\u3001&#39;Four&#39;\u3001&#39;Five&#39;\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528ROTATION\u53c2\u6570\u8c03\u6574\u6807\u7b7e\u89d2\u5ea6<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u65cb\u8f6cx\u8f74\u523b\u5ea6\u6807\u7b7e\u4ee5\u907f\u514d\u6807\u7b7e\u91cd\u53e0\u3002Matplotlib\u63d0\u4f9b\u4e86<code>rotation<\/code>\u53c2\u6570\uff0c\u7528\u4e8e\u8bbe\u7f6e\u6807\u7b7e\u7684\u65cb\u8f6c\u89d2\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [10, 15, 20, 25, 30]<\/p>\n<p>plt.plot(x, y)<\/p>\n<h2><strong>\u81ea\u5b9a\u4e49x\u8f74\u523b\u5ea6\u4f4d\u7f6e\u548c\u6807\u7b7e\uff0c\u5e76\u65cb\u8f6c\u6807\u7b7e<\/strong><\/h2>\n<p>plt.xticks([1, 2, 3, 4, 5], [&#39;One&#39;, &#39;Two&#39;, &#39;Three&#39;, &#39;Four&#39;, &#39;Five&#39;], rotation=45)<\/p>\n<p>plt.xlabel(&#39;X Axis&#39;)<\/p>\n<p>plt.ylabel(&#39;Y Axis&#39;)<\/p>\n<p>plt.title(&#39;Example Plot with Rotated Labels&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06x\u8f74\u523b\u5ea6\u6807\u7b7e\u65cb\u8f6c\u4e8645\u5ea6\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u663e\u793a\u6807\u7b7e\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u4f7f\u7528FONTSIZE\u53c2\u6570\u8c03\u6574\u6807\u7b7e\u5b57\u4f53\u5927\u5c0f<\/p>\n<\/p>\n<p><p>\u6709\u65f6\uff0c\u60a8\u53ef\u80fd\u5e0c\u671b\u8c03\u6574\u523b\u5ea6\u6807\u7b7e\u7684\u5b57\u4f53\u5927\u5c0f\uff0c\u4ee5\u4fbf\u4f7f\u56fe\u8868\u66f4\u5177\u53ef\u8bfb\u6027\u3002Matplotlib\u63d0\u4f9b\u4e86<code>fontsize<\/code>\u53c2\u6570\uff0c\u7528\u4e8e\u8bbe\u7f6e\u6807\u7b7e\u7684\u5b57\u4f53\u5927\u5c0f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [10, 15, 20, 25, 30]<\/p>\n<p>plt.plot(x, y)<\/p>\n<h2><strong>\u81ea\u5b9a\u4e49x\u8f74\u523b\u5ea6\u4f4d\u7f6e\u548c\u6807\u7b7e\uff0c\u5e76\u8bbe\u7f6e\u5b57\u4f53\u5927\u5c0f<\/strong><\/h2>\n<p>plt.xticks([1, 2, 3, 4, 5], [&#39;One&#39;, &#39;Two&#39;, &#39;Three&#39;, &#39;Four&#39;, &#39;Five&#39;], fontsize=12)<\/p>\n<p>plt.xlabel(&#39;X Axis&#39;)<\/p>\n<p>plt.ylabel(&#39;Y Axis&#39;)<\/p>\n<p>plt.title(&#39;Example Plot with Customized Font Size&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06x\u8f74\u523b\u5ea6\u6807\u7b7e\u7684\u5b57\u4f53\u5927\u5c0f\u8bbe\u7f6e\u4e3a12\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u52a8\u6001\u8bbe\u7f6e\u523b\u5ea6\u6807\u7b7e<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u60a8\u53ef\u80fd\u5e0c\u671b\u6839\u636e\u6570\u636e\u52a8\u6001\u8bbe\u7f6e\u523b\u5ea6\u6807\u7b7e\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528Python\u7684\u5faa\u73af\u6216\u5217\u8868\u63a8\u5bfc\u5f0f\u6765\u751f\u6210\u523b\u5ea6\u6807\u7b7e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [10, 15, 20, 25, 30]<\/p>\n<p>plt.plot(x, y)<\/p>\n<h2><strong>\u52a8\u6001\u751f\u6210\u523b\u5ea6\u6807\u7b7e<\/strong><\/h2>\n<p>labels = [f&#39;Label {i}&#39; for i in x]<\/p>\n<p>plt.xticks(x, labels)<\/p>\n<p>plt.xlabel(&#39;X Axis&#39;)<\/p>\n<p>plt.ylabel(&#39;Y Axis&#39;)<\/p>\n<p>plt.title(&#39;Example Plot with Dynamic Labels&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u751f\u6210\u4e86\u4e00\u7ec4\u52a8\u6001\u7684\u523b\u5ea6\u6807\u7b7e\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u591a\u56fe\u8bbe\u7f6exticks<\/p>\n<\/p>\n<p><p>\u5728\u7ed8\u5236\u591a\u4e2a\u5b50\u56fe\u65f6\uff0c\u60a8\u53ef\u4ee5\u5206\u522b\u4e3a\u6bcf\u4e2a\u5b50\u56fe\u8bbe\u7f6e\u4e0d\u540c\u7684x\u8f74\u523b\u5ea6\u548c\u6807\u7b7e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y1 = [10, 15, 20, 25, 30]<\/p>\n<p>y2 = [5, 10, 15, 20, 25]<\/p>\n<p>fig, (ax1, ax2) = plt.subplots(1, 2)<\/p>\n<p>ax1.plot(x, y1)<\/p>\n<p>ax1.set_xticks([1, 3, 5])<\/p>\n<p>ax1.set_xticklabels([&#39;One&#39;, &#39;Three&#39;, &#39;Five&#39;])<\/p>\n<p>ax2.plot(x, y2)<\/p>\n<p>ax2.set_xticks([2, 4])<\/p>\n<p>ax2.set_xticklabels([&#39;Two&#39;, &#39;Four&#39;])<\/p>\n<p>ax1.set_title(&#39;Plot 1&#39;)<\/p>\n<p>ax2.set_title(&#39;Plot 2&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e24\u4e2a\u5b50\u56fe\uff0c\u5e76\u5206\u522b\u4e3a\u5b83\u4eec\u8bbe\u7f6e\u4e86\u4e0d\u540c\u7684x\u8f74\u523b\u5ea6\u548c\u6807\u7b7e\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u5185\u5bb9\u7684\u8be6\u7ec6\u8bb2\u89e3\uff0c\u76f8\u4fe1\u60a8\u5df2\u7ecf\u5bf9\u5982\u4f55\u4f7f\u7528Matplotlib\u5e93\u6765\u4fee\u6539x\u8f74\u523b\u5ea6\u6709\u4e86\u6df1\u5165\u7684\u7406\u89e3\u3002\u901a\u8fc7\u7075\u6d3b\u8fd0\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u60a8\u53ef\u4ee5\u521b\u5efa\u51fa\u66f4\u52a0\u7f8e\u89c2\u548c\u4e13\u4e1a\u7684\u56fe\u8868\uff0c\u4ee5\u6ee1\u8db3\u5404\u79cd\u6570\u636e\u53ef\u89c6\u5316\u9700\u6c42\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u7ed8\u56fe\u4e2d\u81ea\u5b9a\u4e49X\u8f74\u523b\u5ea6\u6807\u7b7e\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528Matplotlib\u5e93\u4e2d\u7684<code>xticks()<\/code>\u51fd\u6570\u6765\u8bbe\u7f6e\u81ea\u5b9a\u4e49\u7684X\u8f74\u523b\u5ea6\u6807\u7b7e\u3002\u9996\u5148\uff0c\u4f7f\u7528<code>plt.xticks()<\/code>\u53ef\u4ee5\u4f20\u5165\u523b\u5ea6\u4f4d\u7f6e\u548c\u5bf9\u5e94\u7684\u6807\u7b7e\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4ee3\u7801\u5b9e\u73b0\uff1a  <\/p>\n<pre><code class=\"language-python\">import matplotlib.pyplot as plt\n\nx = [0, 1, 2, 3]\ny = [10, 20, 25, 30]\nplt.plot(x, y)\nplt.xticks([0, 1, 2, 3], [&#39;Zero&#39;, &#39;One&#39;, &#39;Two&#39;, &#39;Three&#39;])\nplt.show()\n<\/code><\/pre>\n<p>\u8fd9\u6837\u5c31\u53ef\u4ee5\u5c06X\u8f74\u7684\u523b\u5ea6\u6539\u4e3a\u81ea\u5b9a\u4e49\u7684\u6807\u7b7e\u3002<\/p>\n<p><strong>\u5982\u4f55\u6839\u636e\u6570\u636e\u52a8\u6001\u8c03\u6574X\u8f74\u523b\u5ea6\uff1f<\/strong><br \/>\u52a8\u6001\u8c03\u6574X\u8f74\u523b\u5ea6\u53ef\u4ee5\u901a\u8fc7\u83b7\u53d6\u6570\u636e\u7684\u8303\u56f4\u6765\u5b9e\u73b0\u3002\u4f7f\u7528<code>numpy<\/code>\u5e93\u53ef\u4ee5\u65b9\u4fbf\u5730\u751f\u6210\u523b\u5ea6\u4f4d\u7f6e\uff0c\u7136\u540e\u5229\u7528<code>plt.xticks()<\/code>\u66f4\u65b0\u523b\u5ea6\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>np.linspace()<\/code>\u751f\u6210\u5747\u5300\u5206\u5e03\u7684\u523b\u5ea6\uff0c\u9002\u5e94\u6570\u636e\u53d8\u5316\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a  <\/p>\n<pre><code class=\"language-python\">import numpy as np\nimport matplotlib.pyplot as plt\n\nx = np.linspace(0, 10, 100)\ny = np.sin(x)\nplt.plot(x, y)\nplt.xticks(np.arange(0, 11, 1))\nplt.show()\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u786e\u4fddX\u8f74\u7684\u523b\u5ea6\u4e0e\u6570\u636e\u7684\u5206\u5e03\u76f8\u7b26\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u7ed8\u56fe\u4e2d\u9690\u85cf\u6216\u5220\u9664\u67d0\u4e9bX\u8f74\u523b\u5ea6\uff1f<\/strong><br \/>\u5982\u679c\u5e0c\u671b\u9690\u85cf\u67d0\u4e9bX\u8f74\u523b\u5ea6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e<code>plt.xticks()<\/code>\u7684\u53c2\u6570\u4e3a<code>[]<\/code>\u6765\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c\u82e5\u8981\u5220\u9664\u6240\u6709\u523b\u5ea6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">import matplotlib.pyplot as plt\n\nx = [0, 1, 2, 3]\ny = [10, 20, 25, 30]\nplt.plot(x, y)\nplt.xticks([])  # \u9690\u85cf\u6240\u6709X\u8f74\u523b\u5ea6\nplt.show()\n<\/code><\/pre>\n<p>\u8fd9\u5c06\u4f7f\u56fe\u5f62\u770b\u8d77\u6765\u66f4\u6e05\u6670\uff0c\u5c24\u5176\u662f\u5728\u4e0d\u9700\u8981\u663e\u793a\u523b\u5ea6\u7684\u60c5\u51b5\u4e0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u4fee\u6539xticks\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Matplotlib\u5e93\u6765\u5b9e\u73b0\u3002\u4f7f\u7528Matplotlib\u5e93\u7684xtic [&hellip;]","protected":false},"author":3,"featured_media":972706,"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\/972697"}],"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=972697"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/972697\/revisions"}],"predecessor-version":[{"id":972708,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/972697\/revisions\/972708"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/972706"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=972697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=972697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=972697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}