{"id":1116730,"date":"2025-01-08T18:19:14","date_gmt":"2025-01-08T10:19:14","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1116730.html"},"modified":"2025-01-08T18:19:16","modified_gmt":"2025-01-08T10:19:16","slug":"python%e5%a6%82%e4%bd%95%e5%b0%86%e5%90%8d%e5%ad%97%e7%94%bb%e5%87%ba%e6%9d%a5","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1116730.html","title":{"rendered":"python\u5982\u4f55\u5c06\u540d\u5b57\u753b\u51fa\u6765"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25080936\/b61f44df-0431-4416-90dd-c95ac6242c41.webp\" alt=\"python\u5982\u4f55\u5c06\u540d\u5b57\u753b\u51fa\u6765\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u56fe\u5f62\u7ed8\u56fe\u5e93\u5c06\u540d\u5b57\u753b\u51fa\u6765\uff0c\u6bd4\u5982\u4f7f\u7528Matplotlib\u3001Turtle\u7b49\u5e93\u3002\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528Turtle\u7ed8\u56fe\u5e93\u3001\u4f7f\u7528Matplotlib\u7ed8\u5236\u6587\u5b57\u3001\u4f7f\u7528Pillow\u56fe\u50cf\u5904\u7406\u5e93\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u4f7f\u7528Turtle\u5e93\u7684\u65b9\u6cd5\u3002<\/strong><\/p>\n<\/p>\n<p><p><strong>Turtle\u5e93\u662fPython\u5185\u7f6e\u7684\u4e00\u4e2a\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u7684\u7ed8\u56fe\u5e93\uff0c\u9002\u7528\u4e8e\u7ed8\u5236\u7b80\u5355\u7684\u56fe\u5f62\u548c\u6587\u5b57\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u76f8\u5bf9\u5bb9\u6613\u7406\u89e3\u7684\u56fe\u5f62\u754c\u9762\uff0c\u53ef\u4ee5\u901a\u8fc7\u7f16\u7a0b\u63a7\u5236\u4e00\u4e2a\u201c\u6d77\u9f9f\u201d\u5728\u5c4f\u5e55\u4e0a\u7ed8\u5236\u56fe\u50cf\u3002<\/strong><\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528Turtle\u5e93\u7ed8\u5236\u540d\u5b57<\/h3>\n<\/p>\n<p><p><strong>1\u3001\u5b89\u88c5\u548c\u5bfc\u5165Turtle\u5e93<\/strong><\/p>\n<p>Turtle\u5e93\u662fPython\u7684\u6807\u51c6\u5e93\uff0c\u4e0d\u9700\u8981\u989d\u5916\u5b89\u88c5\u3002\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165\u4f7f\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import turtle<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>2\u3001\u8bbe\u7f6e\u7ed8\u56fe\u7a97\u53e3<\/strong><\/p>\n<p>\u9996\u5148\u9700\u8981\u8bbe\u7f6e\u7ed8\u56fe\u7a97\u53e3\u7684\u5927\u5c0f\u3001\u80cc\u666f\u989c\u8272\u7b49\u5c5e\u6027\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2aTurtle\u753b\u5e03\u5bf9\u8c61<\/p>\n<p>screen = turtle.Screen()<\/p>\n<h2><strong>\u8bbe\u7f6e\u753b\u5e03\u80cc\u666f\u989c\u8272<\/strong><\/h2>\n<p>screen.bgcolor(&quot;white&quot;)<\/p>\n<h2><strong>\u8bbe\u7f6e\u753b\u5e03\u6807\u9898<\/strong><\/h2>\n<p>screen.title(&quot;Draw Name with Turtle&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>3\u3001\u521b\u5efaTurtle\u5bf9\u8c61<\/strong><\/p>\n<p>\u521b\u5efa\u4e00\u4e2aTurtle\u5bf9\u8c61\uff0c\u5e76\u8bbe\u7f6e\u5176\u5c5e\u6027\uff0c\u4f8b\u5982\u989c\u8272\u3001\u901f\u5ea6\u3001\u7b14\u7684\u7c97\u7ec6\u7b49\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2aTurtle\u5bf9\u8c61<\/p>\n<p>t = turtle.Turtle()<\/p>\n<h2><strong>\u8bbe\u7f6e\u753b\u7b14\u989c\u8272<\/strong><\/h2>\n<p>t.pencolor(&quot;black&quot;)<\/p>\n<h2><strong>\u8bbe\u7f6e\u753b\u7b14\u7c97\u7ec6<\/strong><\/h2>\n<p>t.pensize(2)<\/p>\n<h2><strong>\u8bbe\u7f6e\u7ed8\u56fe\u901f\u5ea6<\/strong><\/h2>\n<p>t.speed(1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>4\u3001\u7ed8\u5236\u540d\u5b57<\/strong><\/p>\n<p>\u901a\u8fc7\u63a7\u5236Turtle\u5bf9\u8c61\u7684\u79fb\u52a8\u548c\u8f6c\u5411\u6765\u7ed8\u5236\u540d\u5b57\u3002\u4f8b\u5982\uff0c\u7ed8\u5236\u5b57\u6bcd\u201cJACK\u201d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def draw_J():<\/p>\n<p>    t.penup()<\/p>\n<p>    t.goto(-200, 0)<\/p>\n<p>    t.pendown()<\/p>\n<p>    t.forward(50)<\/p>\n<p>    t.backward(25)<\/p>\n<p>    t.right(90)<\/p>\n<p>    t.forward(100)<\/p>\n<p>    t.right(90)<\/p>\n<p>    t.forward(25)<\/p>\n<p>def draw_A():<\/p>\n<p>    t.penup()<\/p>\n<p>    t.goto(-130, 0)<\/p>\n<p>    t.pendown()<\/p>\n<p>    t.left(75)<\/p>\n<p>    t.forward(100)<\/p>\n<p>    t.right(150)<\/p>\n<p>    t.forward(100)<\/p>\n<p>    t.backward(50)<\/p>\n<p>    t.right(105)<\/p>\n<p>    t.forward(30)<\/p>\n<p>def draw_C():<\/p>\n<p>    t.penup()<\/p>\n<p>    t.goto(-60, 0)<\/p>\n<p>    t.pendown()<\/p>\n<p>    t.right(30)<\/p>\n<p>    t.circle(50, 180)<\/p>\n<p>def draw_K():<\/p>\n<p>    t.penup()<\/p>\n<p>    t.goto(10, 50)<\/p>\n<p>    t.pendown()<\/p>\n<p>    t.right(90)<\/p>\n<p>    t.forward(100)<\/p>\n<p>    t.backward(50)<\/p>\n<p>    t.left(45)<\/p>\n<p>    t.forward(70)<\/p>\n<p>    t.backward(70)<\/p>\n<p>    t.right(90)<\/p>\n<p>    t.forward(70)<\/p>\n<h2><strong>\u7ed8\u5236\u540d\u5b57<\/strong><\/h2>\n<p>draw_J()<\/p>\n<p>draw_A()<\/p>\n<p>draw_C()<\/p>\n<p>draw_K()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>5\u3001\u4fdd\u6301\u7a97\u53e3\u6253\u5f00<\/strong><\/p>\n<p>\u6700\u540e\uff0c\u9700\u8981\u4fdd\u6301\u7ed8\u56fe\u7a97\u53e3\u6253\u5f00\uff0c\u76f4\u5230\u7528\u6237\u5173\u95ed\u5b83\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4fdd\u6301\u7a97\u53e3\u6253\u5f00<\/p>\n<p>turtle.done()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f18\u5316\u7ed8\u5236\u6548\u679c<\/h3>\n<\/p>\n<p><p><strong>1\u3001\u4f7f\u7528\u5faa\u73af\u548c\u51fd\u6570<\/strong><\/p>\n<p>\u4e3a\u4e86\u7b80\u5316\u4ee3\u7801\u548c\u907f\u514d\u91cd\u590d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5faa\u73af\u548c\u51fd\u6570\u6765\u7ed8\u5236\u91cd\u590d\u7684\u56fe\u5f62\u6216\u6587\u5b57\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def draw_letter(letter, start_pos):<\/p>\n<p>    # \u6839\u636e\u5b57\u6bcd\u7ed8\u5236\u76f8\u5e94\u7684\u56fe\u5f62<\/p>\n<p>    if letter == &#39;J&#39;:<\/p>\n<p>        draw_J()<\/p>\n<p>    elif letter == &#39;A&#39;:<\/p>\n<p>        draw_A()<\/p>\n<p>    elif letter == &#39;C&#39;:<\/p>\n<p>        draw_C()<\/p>\n<p>    elif letter == &#39;K&#39;:<\/p>\n<p>        draw_K()<\/p>\n<h2><strong>\u7ed8\u5236\u540d\u5b57<\/strong><\/h2>\n<p>name = &quot;JACK&quot;<\/p>\n<p>start_positions = [(-200, 0), (-130, 0), (-60, 0), (10, 50)]<\/p>\n<p>for i, letter in enumerate(name):<\/p>\n<p>    t.penup()<\/p>\n<p>    t.goto(start_positions[i])<\/p>\n<p>    t.pendown()<\/p>\n<p>    draw_letter(letter, start_positions[i])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>2\u3001\u6dfb\u52a0\u989c\u8272\u548c\u5176\u4ed6\u6548\u679c<\/strong><\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u4e0d\u540c\u7684\u989c\u8272\u548c\u6548\u679c\uff0c\u4f7f\u7ed8\u56fe\u66f4\u52a0\u4e30\u5bcc\u591a\u5f69\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8bbe\u7f6e\u4e0d\u540c\u7684\u989c\u8272<\/p>\n<p>colors = [&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;, &quot;orange&quot;]<\/p>\n<p>for i, letter in enumerate(name):<\/p>\n<p>    t.pencolor(colors[i])<\/p>\n<p>    t.penup()<\/p>\n<p>    t.goto(start_positions[i])<\/p>\n<p>    t.pendown()<\/p>\n<p>    draw_letter(letter, start_positions[i])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528Matplotlib\u5e93\u7ed8\u5236\u6587\u5b57<\/h3>\n<\/p>\n<p><p>\u9664\u4e86Turtle\u5e93\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528Matplotlib\u5e93\u6765\u7ed8\u5236\u6587\u5b57\u3002Matplotlib\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u7ed8\u56fe\u5e93\uff0c\u53ef\u4ee5\u7ed8\u5236\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u5f62\u548c\u56fe\u8868\u3002<\/p>\n<\/p>\n<p><p><strong>1\u3001\u5b89\u88c5\u548c\u5bfc\u5165Matplotlib\u5e93<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b89\u88c5Matplotlib\u5e93<\/p>\n<p>!pip install matplotlib<\/p>\n<h2><strong>\u5bfc\u5165Matplotlib\u5e93<\/strong><\/h2>\n<p>import matplotlib.pyplot as plt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>2\u3001\u7ed8\u5236\u6587\u5b57<\/strong><\/p>\n<p>\u4f7f\u7528Matplotlib\u5e93\u4e2d\u7684text\u51fd\u6570\uff0c\u53ef\u4ee5\u8f7b\u677e\u7ed8\u5236\u6587\u5b57\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2a\u7ed8\u56fe\u7a97\u53e3<\/p>\n<p>fig, ax = plt.subplots()<\/p>\n<h2><strong>\u8bbe\u7f6e\u7ed8\u56fe\u7a97\u53e3\u7684\u5927\u5c0f<\/strong><\/h2>\n<p>fig.set_size_inches(8, 6)<\/p>\n<h2><strong>\u7ed8\u5236\u6587\u5b57<\/strong><\/h2>\n<p>ax.text(0.5, 0.5, &#39;JACK&#39;, fontsize=50, ha=&#39;center&#39;, va=&#39;center&#39;)<\/p>\n<h2><strong>\u9690\u85cf\u5750\u6807\u8f74<\/strong><\/h2>\n<p>ax.axis(&#39;off&#39;)<\/p>\n<h2><strong>\u663e\u793a\u7ed8\u56fe<\/strong><\/h2>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528Pillow\u5e93\u7ed8\u5236\u6587\u5b57<\/h3>\n<\/p>\n<p><p>Pillow\u5e93\u662fPython\u7684\u56fe\u50cf\u5904\u7406\u5e93\uff0c\u53ef\u4ee5\u7528\u6765\u5904\u7406\u548c\u751f\u6210\u56fe\u50cf\u6587\u4ef6\u3002\u53ef\u4ee5\u4f7f\u7528Pillow\u5e93\u5728\u56fe\u50cf\u4e0a\u7ed8\u5236\u6587\u5b57\u3002<\/p>\n<\/p>\n<p><p><strong>1\u3001\u5b89\u88c5\u548c\u5bfc\u5165Pillow\u5e93<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b89\u88c5Pillow\u5e93<\/p>\n<p>!pip install pillow<\/p>\n<h2><strong>\u5bfc\u5165Pillow\u5e93<\/strong><\/h2>\n<p>from PIL import Image, ImageDraw, ImageFont<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>2\u3001\u7ed8\u5236\u6587\u5b57<\/strong><\/p>\n<p>\u4f7f\u7528Pillow\u5e93\u4e2d\u7684ImageDraw\u6a21\u5757\uff0c\u53ef\u4ee5\u5728\u56fe\u50cf\u4e0a\u7ed8\u5236\u6587\u5b57\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2a\u7a7a\u767d\u56fe\u50cf<\/p>\n<p>image = Image.new(&#39;RGB&#39;, (500, 300), &#39;white&#39;)<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u7ed8\u56fe\u5bf9\u8c61<\/strong><\/h2>\n<p>draw = ImageDraw.Draw(image)<\/p>\n<h2><strong>\u8bbe\u7f6e\u5b57\u4f53<\/strong><\/h2>\n<p>font = ImageFont.truetype(&quot;arial.ttf&quot;, 100)<\/p>\n<h2><strong>\u7ed8\u5236\u6587\u5b57<\/strong><\/h2>\n<p>draw.text((50, 100), &#39;JACK&#39;, fill=&#39;black&#39;, font=font)<\/p>\n<h2><strong>\u663e\u793a\u56fe\u50cf<\/strong><\/h2>\n<p>image.show()<\/p>\n<h2><strong>\u4fdd\u5b58\u56fe\u50cf<\/strong><\/h2>\n<p>image.save(&#39;name.png&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5728Python\u4e2d\u4f7f\u7528\u4e0d\u540c\u7684\u5e93\u7ed8\u5236\u540d\u5b57\u3002\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5e93\u548c\u65b9\u6cd5\uff0c\u80fd\u591f\u5b9e\u73b0\u66f4\u52a0\u4e30\u5bcc\u548c\u4e2a\u6027\u5316\u7684\u6548\u679c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u7ed8\u5236\u540d\u5b57\u7684\u56fe\u5f62\u6548\u679c\uff1f<\/strong><br \/>\u4f7f\u7528Python\u7684\u56fe\u5f62\u5e93\uff0c\u5982Matplotlib\u548cTurtle\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u7ed8\u5236\u540d\u5b57\u3002Matplotlib\u9002\u5408\u7ed8\u5236\u56fe\u5f62\u548c\u6570\u636e\u53ef\u89c6\u5316\uff0c\u800cTurtle\u5219\u9002\u5408\u56fe\u5f62\u5316\u7ed8\u5236\u3002\u5bf9\u4e8eTurtle\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u7684\u547d\u4ee4\u7ed8\u5236\u5b57\u6bcd\uff0c\u8c03\u6574\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\uff0c\u521b\u9020\u51fa\u4e2a\u6027\u5316\u7684\u6548\u679c\u3002\u5177\u4f53\u6b65\u9aa4\u5305\u62ec\u5b89\u88c5\u5e93\u3001\u8bbe\u7f6e\u753b\u5e03\u3001\u7ed8\u5236\u5b57\u6bcd\u548c\u6dfb\u52a0\u989c\u8272\u3002<\/p>\n<p><strong>\u6211\u9700\u8981\u5b89\u88c5\u54ea\u4e9b\u5e93\u624d\u80fd\u5728Python\u4e2d\u7ed8\u5236\u540d\u5b57\uff1f<\/strong><br \/>\u4e3a\u4e86\u5728Python\u4e2d\u7ed8\u5236\u540d\u5b57\uff0c\u5efa\u8bae\u5b89\u88c5Matplotlib\u548cTurtle\u5e93\u3002Matplotlib\u901a\u5e38\u9884\u88c5\u5728\u8bb8\u591aPython\u53d1\u884c\u7248\u4e2d\u3002\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662fAnaconda\u6216\u5176\u4ed6Python\u73af\u5883\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4<code>pip install matplotlib<\/code>\u5b89\u88c5\u3002Turtle\u5e93\u901a\u5e38\u968fPython\u4e00\u8d77\u63d0\u4f9b\uff0c\u56e0\u6b64\u65e0\u9700\u5355\u72ec\u5b89\u88c5\u3002\u786e\u4fdd\u4f60\u7684Python\u73af\u5883\u662f\u6700\u65b0\u7248\u672c\uff0c\u4ee5\u83b7\u5f97\u6700\u4f73\u7684\u517c\u5bb9\u6027\u3002<\/p>\n<p><strong>\u5982\u4f55\u81ea\u5b9a\u4e49\u540d\u5b57\u7684\u989c\u8272\u548c\u5b57\u4f53\u6837\u5f0f\uff1f<\/strong><br \/>\u5728Python\u4e2d\u7ed8\u5236\u540d\u5b57\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u53c2\u6570\u6765\u81ea\u5b9a\u4e49\u989c\u8272\u548c\u5b57\u4f53\u6837\u5f0f\u3002\u4f8b\u5982\uff0c\u5728Matplotlib\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>fontdict<\/code>\u53c2\u6570\u6307\u5b9a\u5b57\u4f53\u7684\u6837\u5f0f\u548c\u5927\u5c0f\uff0c\u540c\u65f6\u4f7f\u7528<code>color<\/code>\u53c2\u6570\u6765\u8bbe\u7f6e\u540d\u5b57\u7684\u989c\u8272\u3002\u5bf9\u4e8eTurtle\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528<code>turtle.color()<\/code>\u65b9\u6cd5\u6765\u6539\u53d8\u989c\u8272\uff0c\u5e76\u901a\u8fc7<code>turtle.write()<\/code>\u65b9\u6cd5\u4e2d\u7684<code>font<\/code>\u53c2\u6570\u6765\u8bbe\u7f6e\u5b57\u4f53\u6837\u5f0f\u548c\u5927\u5c0f\u3002\u8fd9\u4e9b\u9009\u9879\u4f7f\u4f60\u80fd\u591f\u521b\u9020\u51fa\u72ec\u7279\u7684\u89c6\u89c9\u6548\u679c\uff0c\u7b26\u5408\u4e2a\u4eba\u559c\u597d\u3002<\/p>\n<p><strong>\u5982\u679c\u6211\u60f3\u5c06\u7ed8\u5236\u7684\u540d\u5b57\u4fdd\u5b58\u4e3a\u56fe\u50cf\u6587\u4ef6\u8be5\u600e\u4e48\u505a\uff1f<\/strong><br \/>\u5728\u4f7f\u7528Matplotlib\u7ed8\u5236\u540d\u5b57\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528<code>plt.savefig(&#39;filename.png&#39;)<\/code>\u6765\u5c06\u56fe\u50cf\u4fdd\u5b58\u4e3aPNG\u6587\u4ef6\u3002\u4f60\u53ef\u4ee5\u6307\u5b9a\u6587\u4ef6\u540d\u548c\u683c\u5f0f\uff0c\u652f\u6301\u591a\u79cd\u56fe\u50cf\u683c\u5f0f\uff0c\u5982PNG\u3001JPEG\u7b49\u3002\u5bf9\u4e8eTurtle\u5e93\uff0c\u4fdd\u5b58\u56fe\u50cf\u7a0d\u5fae\u590d\u6742\uff0c\u53ef\u4ee5\u4f7f\u7528<code>Screen().getcanvas().postscript()<\/code>\u5c06\u56fe\u5f62\u4fdd\u5b58\u4e3aPostScript\u683c\u5f0f\uff0c\u7136\u540e\u7528\u5176\u4ed6\u5de5\u5177\u8f6c\u6362\u4e3a\u5e38\u89c1\u683c\u5f0f\u5982PNG\u3002\u786e\u4fdd\u5728\u4fdd\u5b58\u524d\u8bbe\u7f6e\u597d\u753b\u5e03\u7684\u5927\u5c0f\u548c\u80cc\u666f\u8272\uff0c\u4ee5\u83b7\u5f97\u6700\u4f73\u6548\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u56fe\u5f62\u7ed8\u56fe\u5e93\u5c06\u540d\u5b57\u753b\u51fa\u6765\uff0c\u6bd4\u5982\u4f7f\u7528Matplotlib\u3001Turtle\u7b49\u5e93\u3002\u5e38\u7528\u7684\u65b9\u6cd5\u5305 [&hellip;]","protected":false},"author":3,"featured_media":1116734,"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\/1116730"}],"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=1116730"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1116730\/revisions"}],"predecessor-version":[{"id":1116735,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1116730\/revisions\/1116735"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1116734"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1116730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1116730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1116730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}