{"id":998507,"date":"2024-12-27T09:33:49","date_gmt":"2024-12-27T01:33:49","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/998507.html"},"modified":"2024-12-27T09:33:52","modified_gmt":"2024-12-27T01:33:52","slug":"python%e5%a6%82%e4%bd%95%e5%9b%ba%e5%ae%9ay%e5%9d%90%e6%a0%87","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/998507.html","title":{"rendered":"python\u5982\u4f55\u56fa\u5b9ay\u5750\u6807"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25073921\/f386a572-7004-4c47-9d37-96105c2d6e3c.webp\" alt=\"python\u5982\u4f55\u56fa\u5b9ay\u5750\u6807\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u56fa\u5b9ay\u5750\u6807\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5176\u4e2d\u5305\u62ec\u4f7f\u7528Matplotlib\u5e93\u4e2d\u7684<code>set_ylim()<\/code>\u51fd\u6570\u3001\u521b\u5efa\u81ea\u5b9a\u4e49\u7684\u7ed8\u56fe\u7c7b\u3001\u4f7f\u7528\u76f8\u5bf9\u5750\u6807\u7cfb\u7b49\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Matplotlib\u5e93\u4e2d\u7684<code>set_ylim()<\/code>\u51fd\u6570\u6765\u56fa\u5b9ay\u5750\u6807\u3002<\/strong><\/p>\n<\/p>\n<p><p><code>set_ylim()<\/code>\u51fd\u6570\u662fMatplotlib\u5e93\u4e2d\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u7528\u6765\u8bbe\u7f6ey\u8f74\u7684\u4e0a\u4e0b\u9650\uff0c\u4ece\u800c\u5b9e\u73b0y\u5750\u6807\u7684\u56fa\u5b9a\u3002\u901a\u8fc7\u8fd9\u4e2a\u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u786e\u4fdd\u56fe\u8868\u5728y\u8f74\u4e0a\u4fdd\u6301\u56fa\u5b9a\u7684\u8303\u56f4\uff0c\u907f\u514d\u5728\u4e0d\u540c\u7684\u6570\u636e\u96c6\u4e2dy\u8f74\u8303\u56f4\u81ea\u52a8\u8c03\u6574\u7684\u95ee\u9898\u3002\u4e0b\u9762\u6211\u5c06\u8be6\u7ec6\u8bf4\u660e\u5982\u4f55\u4f7f\u7528\u8be5\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001MATPLOTLIB\u5e93\u6982\u8ff0<\/p>\n<\/p>\n<p><p>Matplotlib\u662fPython\u4e2d\u6700\u6d41\u884c\u7684\u7ed8\u56fe\u5e93\u4e4b\u4e00\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u6613\u7528\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u8868\u3002\u901a\u8fc7Matplotlib\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5730\u8fdb\u884c\u6570\u636e\u53ef\u89c6\u5316\uff0c\u4ece\u800c\u66f4\u597d\u5730\u7406\u89e3\u6570\u636e\u3002\u8981\u4f7f\u7528Matplotlib\uff0c\u6211\u4eec\u9996\u5148\u9700\u8981\u5b89\u88c5\u8be5\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7\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\u6211\u4eec\u5c31\u53ef\u4ee5\u5728Python\u4ee3\u7801\u4e2d\u5bfc\u5165Matplotlib\u5e76\u5f00\u59cb\u7ed8\u56fe\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528SET_YLIM()\u56fa\u5b9aY\u5750\u6807<\/p>\n<\/p>\n<ol>\n<li><strong>\u57fa\u672c\u7528\u6cd5<\/strong><\/li>\n<\/ol>\n<p><p>\u4f7f\u7528<code>set_ylim()<\/code>\u51fd\u6570\u53ef\u4ee5\u8f7b\u677e\u5730\u56fa\u5b9a\u56fe\u8868\u7684y\u5750\u6807\u3002\u8fd9\u4e2a\u51fd\u6570\u63a5\u53d7\u4e24\u4e2a\u53c2\u6570\uff0c\u5206\u522b\u662fy\u8f74\u7684\u4e0b\u9650\u548c\u4e0a\u9650\u3002\u901a\u8fc7\u8bbe\u7f6e\u8fd9\u4e24\u4e2a\u53c2\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u786e\u4fddy\u8f74\u8303\u56f4\u5728\u4e0d\u540c\u7684\u6570\u636e\u96c6\u4e2d\u4fdd\u6301\u4e00\u81f4\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u521b\u5efa\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [2, 3, 5, 7, 11]<\/p>\n<h2><strong>\u7ed8\u5236\u56fe\u8868<\/strong><\/h2>\n<p>plt.plot(x, y)<\/p>\n<h2><strong>\u56fa\u5b9ay\u8f74\u5750\u6807<\/strong><\/h2>\n<p>plt.ylim(0, 15)<\/p>\n<h2><strong>\u663e\u793a\u56fe\u8868<\/strong><\/h2>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u901a\u8fc7<code>plt.ylim(0, 15)<\/code>\u5c06y\u8f74\u7684\u8303\u56f4\u56fa\u5b9a\u4e3a0\u523015\uff0c\u65e0\u8bba\u6570\u636e\u5982\u4f55\u53d8\u5316\uff0cy\u8f74\u7684\u8303\u56f4\u90fd\u4fdd\u6301\u4e0d\u53d8\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u52a8\u6001\u8c03\u6574<\/strong><\/li>\n<\/ol>\n<p><p>\u6709\u65f6\u5019\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u6839\u636e\u6570\u636e\u7684\u7279\u6027\u52a8\u6001\u8c03\u6574y\u8f74\u7684\u8303\u56f4\uff0c\u540c\u65f6\u4fdd\u6301\u4e00\u5b9a\u7684\u56fa\u5b9a\u8303\u56f4\u3002\u53ef\u4ee5\u4f7f\u7528Python\u4e2d\u7684\u5185\u7f6e\u51fd\u6570<code>min()<\/code>\u548c<code>max()<\/code>\u6765\u83b7\u53d6\u6570\u636e\u7684\u6700\u5c0f\u503c\u548c\u6700\u5927\u503c\uff0c\u7136\u540e\u5728\u6b64\u57fa\u7840\u4e0a\u8fdb\u884c\u4e00\u5b9a\u7684\u8c03\u6574\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u83b7\u53d6\u6570\u636e\u7684\u6700\u5c0f\u503c\u548c\u6700\u5927\u503c<\/p>\n<p>y_min = min(y)<\/p>\n<p>y_max = max(y)<\/p>\n<h2><strong>\u56fa\u5b9ay\u8f74\u5750\u6807\uff0c\u589e\u52a0\u4e00\u5b9a\u7684\u8303\u56f4<\/strong><\/h2>\n<p>plt.ylim(y_min - 1, y_max + 1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u786e\u4fddy\u8f74\u8303\u56f4\u9002\u5408\u6570\u636e\uff0c\u540c\u65f6\u4fdd\u6301\u4e00\u5b9a\u7684\u56fa\u5b9a\u8303\u56f4\uff0c\u907f\u514d\u56e0\u6570\u636e\u6ce2\u52a8\u5bfc\u81f4y\u8f74\u8303\u56f4\u8fc7\u4e8e\u7d27\u51d1\u6216\u677e\u6563\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u521b\u5efa\u81ea\u5b9a\u4e49\u7ed8\u56fe\u7c7b<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u590d\u6742\u7684\u5e94\u7528\u573a\u666f\u4e2d\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684\u7ed8\u56fe\u7c7b\uff0c\u4ee5\u5b9e\u73b0\u66f4\u591a\u7684\u529f\u80fd\u548c\u7075\u6d3b\u6027\u3002\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7c7b\uff0c\u6211\u4eec\u53ef\u4ee5\u5c01\u88c5Matplotlib\u7684\u529f\u80fd\uff0c\u5e76\u6839\u636e\u9700\u8981\u6dfb\u52a0\u66f4\u591a\u7684\u7279\u6027\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b9a\u4e49\u81ea\u5b9a\u4e49\u7c7b<\/strong><\/li>\n<\/ol>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7c7b\u6765\u5c01\u88c5Matplotlib\u7684\u7ed8\u56fe\u529f\u80fd\uff0c\u5e76\u5728\u7c7b\u4e2d\u6dfb\u52a0\u65b9\u6cd5\u6765\u56fa\u5b9ay\u5750\u6807\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class CustomPlot:<\/p>\n<p>    def __init__(self, x, y):<\/p>\n<p>        self.x = x<\/p>\n<p>        self.y = y<\/p>\n<p>        self.fig, self.ax = plt.subplots()<\/p>\n<p>    def plot(self):<\/p>\n<p>        self.ax.plot(self.x, self.y)<\/p>\n<p>    def set_y_fixed(self, y_min, y_max):<\/p>\n<p>        self.ax.set_ylim(y_min, y_max)<\/p>\n<p>    def show(self):<\/p>\n<p>        plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528\u81ea\u5b9a\u4e49\u7c7b<\/strong><\/li>\n<\/ol>\n<p><p>\u5b9a\u4e49\u597d\u81ea\u5b9a\u4e49\u7c7b\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u7c7b\u7684\u5b9e\u4f8b\uff0c\u5e76\u4f7f\u7528\u5176\u4e2d\u7684\u65b9\u6cd5\u6765\u7ed8\u5236\u56fe\u8868\u548c\u56fa\u5b9ay\u5750\u6807\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u793a\u4f8b\u6570\u636e<\/p>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [2, 3, 5, 7, 11]<\/p>\n<h2><strong>\u521b\u5efa\u81ea\u5b9a\u4e49\u7ed8\u56fe\u5bf9\u8c61<\/strong><\/h2>\n<p>plot = CustomPlot(x, y)<\/p>\n<h2><strong>\u7ed8\u5236\u56fe\u8868<\/strong><\/h2>\n<p>plot.plot()<\/p>\n<h2><strong>\u56fa\u5b9ay\u8f74\u5750\u6807<\/strong><\/h2>\n<p>plot.set_y_fixed(0, 15)<\/p>\n<h2><strong>\u663e\u793a\u56fe\u8868<\/strong><\/h2>\n<p>plot.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u81ea\u5b9a\u4e49\u7c7b\u4e2d\u5c01\u88c5\u7ed8\u56fe\u548c\u56fa\u5b9ay\u5750\u6807\u7684\u529f\u80fd\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u9ad8\u7684\u53ef\u91cd\u7528\u6027\u548c\u7075\u6d3b\u6027\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528\u76f8\u5bf9\u5750\u6807\u7cfb<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u76f8\u5bf9\u5750\u6807\u7cfb\u6765\u56fa\u5b9ay\u5750\u6807\u3002\u76f8\u5bf9\u5750\u6807\u7cfb\u662f\u4e00\u79cd\u76f8\u5bf9\u4e8e\u56fe\u8868\u5c3a\u5bf8\u7684\u5750\u6807\u7cfb\uff0c\u5b83\u4f7f\u75280\u52301\u4e4b\u95f4\u7684\u503c\u6765\u8868\u793a\u5750\u6807\u3002\u4f8b\u5982\uff0c0\u8868\u793a\u5750\u6807\u7cfb\u7684\u8d77\u70b9\uff0c1\u8868\u793a\u5750\u6807\u7cfb\u7684\u7ec8\u70b9\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5e94\u7528\u76f8\u5bf9\u5750\u6807\u7cfb<\/strong><\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4f7f\u7528\u76f8\u5bf9\u5750\u6807\u7cfb\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u5b9e\u73b0y\u5750\u6807\u7684\u56fa\u5b9a\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>x = np.linspace(0, 10, 100)<\/p>\n<p>y = np.sin(x)<\/p>\n<h2><strong>\u521b\u5efa\u56fe\u8868<\/strong><\/h2>\n<p>fig, ax = plt.subplots()<\/p>\n<h2><strong>\u7ed8\u5236\u56fe\u8868<\/strong><\/h2>\n<p>ax.plot(x, y)<\/p>\n<h2><strong>\u4f7f\u7528\u76f8\u5bf9\u5750\u6807\u7cfb\u56fa\u5b9ay\u8f74\u8303\u56f4<\/strong><\/h2>\n<p>ax.set_ylim(0, 1)<\/p>\n<h2><strong>\u663e\u793a\u56fe\u8868<\/strong><\/h2>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u901a\u8fc7<code>ax.set_ylim(0, 1)<\/code>\u5c06y\u8f74\u7684\u8303\u56f4\u56fa\u5b9a\u4e3a\u76f8\u5bf9\u5750\u6807\u7cfb\u76840\u52301\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u9002\u7528\u573a\u666f<\/strong><\/li>\n<\/ol>\n<p><p>\u76f8\u5bf9\u5750\u6807\u7cfb\u5728\u9700\u8981\u6839\u636e\u56fe\u8868\u5c3a\u5bf8\u8c03\u6574y\u5750\u6807\u7684\u573a\u666f\u4e2d\u975e\u5e38\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5728\u521b\u5efa\u4ea4\u4e92\u5f0f\u56fe\u8868\u6216\u52a8\u6001\u8c03\u6574\u56fe\u8868\u5c3a\u5bf8\u7684\u5e94\u7528\u4e2d\uff0c\u76f8\u5bf9\u5750\u6807\u7cfb\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u63a7\u5236y\u5750\u6807\u7684\u56fa\u5b9a\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u56fa\u5b9ay\u5750\u6807\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5176\u4e2d\u4f7f\u7528Matplotlib\u5e93\u7684<code>set_ylim()<\/code>\u51fd\u6570\u662f\u6700\u7b80\u5355\u548c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u3002\u901a\u8fc7\u8bbe\u7f6ey\u8f74\u7684\u4e0a\u4e0b\u9650\uff0c\u6211\u4eec\u53ef\u4ee5\u786e\u4fddy\u8f74\u8303\u56f4\u5728\u4e0d\u540c\u7684\u6570\u636e\u96c6\u4e2d\u4fdd\u6301\u4e00\u81f4\u3002\u6b64\u5916\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u521b\u5efa\u81ea\u5b9a\u4e49\u7684\u7ed8\u56fe\u7c7b\u548c\u4f7f\u7528\u76f8\u5bf9\u5750\u6807\u7cfb\u6765\u5b9e\u73b0\u66f4\u591a\u7684\u529f\u80fd\u548c\u7075\u6d3b\u6027\u3002\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u6765\u56fa\u5b9ay\u5750\u6807\uff0c\u4ece\u800c\u66f4\u597d\u5730\u8fdb\u884c\u6570\u636e\u53ef\u89c6\u5316\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u56fa\u5b9ay\u5750\u6807\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u56fe\u5f62\u7ed8\u5236\u5e93\u6765\u56fa\u5b9ay\u5750\u6807\u3002\u4f8b\u5982\uff0c\u4f7f\u7528Matplotlib\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u5750\u6807\u8f74\u7684\u8303\u56f4\u6765\u56fa\u5b9ay\u5750\u6807\u3002\u5177\u4f53\u800c\u8a00\uff0c\u53ef\u4ee5\u4f7f\u7528<code>plt.ylim(ymin, ymax)<\/code>\u51fd\u6570\u6765\u9650\u5236y\u8f74\u7684\u503c\uff0c\u4ece\u800c\u8fbe\u5230\u56fa\u5b9ay\u5750\u6807\u7684\u6548\u679c\u3002<\/p>\n<p><strong>\u5728\u4f7f\u7528Matplotlib\u65f6\uff0c\u5982\u4f55\u7ed8\u5236\u56fa\u5b9ay\u5750\u6807\u7684\u56fe\u5f62\uff1f<\/strong><br \/>\u5728\u7ed8\u5236\u56fe\u5f62\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6ey\u5750\u6807\u7684\u8303\u56f4\u6765\u786e\u4fdd\u6570\u636e\u5728\u7279\u5b9a\u7684y\u503c\u8303\u56f4\u5185\u663e\u793a\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u5728\u7ed8\u56fe\u4ee3\u7801\u4e2d\u6dfb\u52a0<code>plt.ylim(min_value, max_value)<\/code>\u6765\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60f3\u8981y\u5750\u6807\u56fa\u5b9a\u57280\u523010\u4e4b\u95f4\uff0c\u53ef\u4ee5\u5728\u7ed8\u5236\u5b8c\u56fe\u5f62\u540e\u8c03\u7528\u6b64\u51fd\u6570\u3002<\/p>\n<p><strong>Python\u4e2d\u6709\u54ea\u4e9b\u5176\u4ed6\u5e93\u53ef\u4ee5\u5b9e\u73b0\u56fa\u5b9ay\u5750\u6807\u7684\u529f\u80fd\uff1f<\/strong><br \/>\u9664\u4e86Matplotlib\uff0c\u5176\u4ed6\u4e00\u4e9b\u5e93\u4e5f\u80fd\u591f\u5b9e\u73b0\u56fa\u5b9ay\u5750\u6807\u7684\u529f\u80fd\u3002\u4f8b\u5982\uff0cSeaborn\u548cPlotly\u7b49\u53ef\u89c6\u5316\u5e93\u540c\u6837\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6ey\u8f74\u8303\u56f4\u6765\u56fa\u5b9ay\u5750\u6807\u3002\u4f7f\u7528\u8fd9\u4e9b\u5e93\u65f6\uff0c\u7528\u6237\u53ef\u4ee5\u67e5\u9605\u76f8\u5e94\u7684\u6587\u6863\uff0c\u4e86\u89e3\u5982\u4f55\u8c03\u6574y\u8f74\u7684\u8303\u56f4\u4ee5\u6ee1\u8db3\u9700\u6c42\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u6570\u636e\u5206\u6790\u4e2d\u4f7f\u7528\u56fa\u5b9ay\u5750\u6807\u7684\u56fe\u5f62\uff1f<\/strong><br \/>\u5728\u6570\u636e\u5206\u6790\u4e2d\uff0c\u56fa\u5b9ay\u5750\u6807\u53ef\u4ee5\u5e2e\u52a9\u66f4\u6e05\u6670\u5730\u5c55\u793a\u6570\u636e\u53d8\u5316\uff0c\u5c24\u5176\u662f\u5728\u6bd4\u8f83\u4e0d\u540c\u6570\u636e\u96c6\u65f6\u3002\u901a\u8fc7\u4f7f\u7528\u56fa\u5b9ay\u5750\u6807\uff0c\u5206\u6790\u8005\u53ef\u4ee5\u907f\u514d\u7531\u4e8ey\u8f74\u8303\u56f4\u53d8\u5316\u800c\u5f15\u8d77\u7684\u8bef\u5bfc\u6027\u89e3\u8bfb\u3002\u4e3a\u4e86\u5b9e\u73b0\u8fd9\u4e00\u70b9\uff0c\u53ef\u4ee5\u5728\u6570\u636e\u53ef\u89c6\u5316\u65f6\u660e\u786e\u8bbe\u7f6ey\u8f74\u7684\u8303\u56f4\uff0c\u5e76\u5728\u56fe\u4f8b\u4e2d\u8bf4\u660e\u8fd9\u4e00\u70b9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u56fa\u5b9ay\u5750\u6807\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5176\u4e2d\u5305\u62ec\u4f7f\u7528Matplotlib\u5e93\u4e2d\u7684set_ylim()\u51fd\u6570\u3001\u521b\u5efa\u81ea [&hellip;]","protected":false},"author":3,"featured_media":998517,"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\/998507"}],"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=998507"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/998507\/revisions"}],"predecessor-version":[{"id":998520,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/998507\/revisions\/998520"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/998517"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=998507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=998507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=998507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}