{"id":1187701,"date":"2025-01-15T20:08:38","date_gmt":"2025-01-15T12:08:38","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1187701.html"},"modified":"2025-01-15T20:08:43","modified_gmt":"2025-01-15T12:08:43","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e5%88%b6%e4%bd%9c%e8%af%8d%e4%ba%91%e5%9b%be","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1187701.html","title":{"rendered":"\u5982\u4f55\u7528python\u5236\u4f5c\u8bcd\u4e91\u56fe"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25140230\/91e58331-872d-4f4c-973b-1c769adf1ce8.webp\" alt=\"\u5982\u4f55\u7528python\u5236\u4f5c\u8bcd\u4e91\u56fe\" \/><\/p>\n<p><p> <strong>\u7528Python\u5236\u4f5c\u8bcd\u4e91\u56fe\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u5e38\u89c1\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u5b89\u88c5\u76f8\u5173\u5e93\u3001\u51c6\u5907\u6587\u672c\u6570\u636e\u3001\u751f\u6210\u8bcd\u4e91\u56fe\u3001\u53ef\u89c6\u5316\u548c\u4f18\u5316\u8bcd\u4e91\u56fe\u3002<\/strong> \u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u51c6\u5907\u597d\u6587\u672c\u6570\u636e\uff0c\u7136\u540e\u5229\u7528Python\u7684\u7b2c\u4e09\u65b9\u5e93\u5982wordcloud\u6765\u751f\u6210\u8bcd\u4e91\u56fe\u3002\u4e0b\u9762\u662f\u8be6\u7ec6\u7684\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5\u76f8\u5173\u5e93<\/h3>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684Python\u5e93\u3002\u8fd9\u4e9b\u5e93\u5305\u62ec<code>wordcloud<\/code>\u3001<code>matplotlib<\/code>\u4ee5\u53ca<code>Pillow<\/code>\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">pip install wordcloud matplotlib pillow<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u51c6\u5907\u6587\u672c\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u5236\u4f5c\u8bcd\u4e91\u56fe\u7684\u7b2c\u4e00\u6b65\u662f\u51c6\u5907\u597d\u6587\u672c\u6570\u636e\u3002\u6587\u672c\u6570\u636e\u53ef\u4ee5\u6765\u81ea\u6587\u4ef6\u3001\u7f51\u9875\u3001\u6570\u636e\u5e93\u7b49\u591a\u79cd\u6765\u6e90\u3002\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u4e00\u4e2a\u7b80\u5355\u7684\u6587\u672c\u6587\u4ef6\u4f5c\u4e3a\u6570\u636e\u6765\u6e90\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &quot;&quot;&quot;<\/p>\n<p>Python is an interpreted high-level general-purpose programming language. <\/p>\n<p>Python&#39;s design philosophy emphasizes code readability with its notable use of significant indentation. <\/p>\n<p>Its language constructs as well as its object-oriented approach <a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>m to help programmers write clear, logical code for small and large-scale projects.<\/p>\n<p>&quot;&quot;&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u751f\u6210\u8bcd\u4e91\u56fe<\/h3>\n<\/p>\n<p><p>\u6709\u4e86\u6587\u672c\u6570\u636e\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>wordcloud<\/code>\u5e93\u751f\u6210\u8bcd\u4e91\u56fe\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from wordcloud import WordCloud<\/p>\n<h2><strong>\u751f\u6210\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>wordcloud = WordCloud(width=800, height=400, background_color=&#39;white&#39;).generate(text)<\/p>\n<h2><strong>\u663e\u793a\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>plt.figure(figsize=(10, 5))<\/p>\n<p>plt.imshow(wordcloud, interpolation=&#39;bilinear&#39;)<\/p>\n<p>plt.axis(&#39;off&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u53ef\u89c6\u5316\u548c\u4f18\u5316\u8bcd\u4e91\u56fe<\/h3>\n<\/p>\n<p><p>\u5728\u751f\u6210\u57fa\u672c\u7684\u8bcd\u4e91\u56fe\u540e\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u53c2\u6570\u6765\u4f18\u5316\u8bcd\u4e91\u56fe\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u6539\u53d8\u8bcd\u4e91\u56fe\u7684\u5f62\u72b6\u3001\u989c\u8272\u3001\u5b57\u4f53\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u6539\u53d8\u8bcd\u4e91\u56fe\u7684\u5f62\u72b6<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u81ea\u5b9a\u4e49\u7684\u8499\u7248\u56fe\u7247\u6765\u6539\u53d8\u8bcd\u4e91\u56fe\u7684\u5f62\u72b6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from wordcloud import WordCloud<\/p>\n<p>import numpy as np<\/p>\n<p>from PIL import Image<\/p>\n<h2><strong>\u52a0\u8f7d\u8499\u7248\u56fe\u7247<\/strong><\/h2>\n<p>mask = np.array(Image.open(&#39;mask.png&#39;))<\/p>\n<h2><strong>\u751f\u6210\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>wordcloud = WordCloud(width=800, height=400, background_color=&#39;white&#39;, mask=mask).generate(text)<\/p>\n<h2><strong>\u663e\u793a\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>plt.figure(figsize=(10, 5))<\/p>\n<p>plt.imshow(wordcloud, interpolation=&#39;bilinear&#39;)<\/p>\n<p>plt.axis(&#39;off&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u6539\u53d8\u8bcd\u4e91\u56fe\u7684\u989c\u8272<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u81ea\u5b9a\u4e49\u989c\u8272\u51fd\u6570\u6765\u6539\u53d8\u8bcd\u4e91\u56fe\u7684\u989c\u8272\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from wordcloud import WordCloud<\/p>\n<p>import numpy as np<\/p>\n<p>from PIL import Image<\/p>\n<h2><strong>\u5b9a\u4e49\u989c\u8272\u51fd\u6570<\/strong><\/h2>\n<p>def grey_color_func(word, font_size, position, orientation, random_state=None, kwargs):<\/p>\n<p>    return &quot;hsl(0, 0%%, %d%%)&quot; % np.random.randint(60, 100)<\/p>\n<h2><strong>\u751f\u6210\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>wordcloud = WordCloud(width=800, height=400, background_color=&#39;white&#39;).generate(text)<\/p>\n<h2><strong>\u5e94\u7528\u989c\u8272\u51fd\u6570<\/strong><\/h2>\n<p>wordcloud.recolor(color_func=grey_color_func)<\/p>\n<h2><strong>\u663e\u793a\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>plt.figure(figsize=(10, 5))<\/p>\n<p>plt.imshow(wordcloud, interpolation=&#39;bilinear&#39;)<\/p>\n<p>plt.axis(&#39;off&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u4f18\u5316\u7ec6\u8282<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8\u8bcd\u4e91\u56fe\u7684\u8d28\u91cf\u548c\u53ef\u8bfb\u6027\uff0c\u53ef\u4ee5\u8fdb\u884c\u4e00\u4e9b\u7ec6\u8282\u4e0a\u7684\u4f18\u5316\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u53bb\u9664\u505c\u7528\u8bcd\u3001\u8c03\u6574\u8bcd\u9891\u9608\u503c\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u53bb\u9664\u505c\u7528\u8bcd<\/h4>\n<\/p>\n<p><p>\u505c\u7528\u8bcd\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u5355\u8bcd\uff0c\u5982&quot;and&quot;\u3001&quot;the&quot;\u7b49\uff0c\u5728\u751f\u6210\u8bcd\u4e91\u56fe\u65f6\u53ef\u4ee5\u53bb\u9664\u8fd9\u4e9b\u8bcd\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from wordcloud import STOPWORDS<\/p>\n<h2><strong>\u6dfb\u52a0\u81ea\u5b9a\u4e49\u505c\u7528\u8bcd<\/strong><\/h2>\n<p>stopwords = set(STOPWORDS)<\/p>\n<p>stopwords.update([&quot;Python&quot;, &quot;programming&quot;])<\/p>\n<h2><strong>\u751f\u6210\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>wordcloud = WordCloud(width=800, height=400, background_color=&#39;white&#39;, stopwords=stopwords).generate(text)<\/p>\n<h2><strong>\u663e\u793a\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>plt.figure(figsize=(10, 5))<\/p>\n<p>plt.imshow(wordcloud, interpolation=&#39;bilinear&#39;)<\/p>\n<p>plt.axis(&#39;off&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8c03\u6574\u8bcd\u9891\u9608\u503c<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574<code>max_words<\/code>\u548c<code>min_font_size<\/code>\u53c2\u6570\u6765\u63a7\u5236\u663e\u793a\u7684\u8bcd\u8bed\u6570\u91cf\u548c\u5b57\u4f53\u5927\u5c0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u751f\u6210\u8bcd\u4e91\u56fe<\/p>\n<p>wordcloud = WordCloud(width=800, height=400, background_color=&#39;white&#39;, max_words=100, min_font_size=10).generate(text)<\/p>\n<h2><strong>\u663e\u793a\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>plt.figure(figsize=(10, 5))<\/p>\n<p>plt.imshow(wordcloud, interpolation=&#39;bilinear&#39;)<\/p>\n<p>plt.axis(&#39;off&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u793a\u4f8b\u4ee3\u7801\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4ece\u6587\u672c\u6570\u636e\u751f\u6210\u8bcd\u4e91\u56fe\uff0c\u5e76\u8fdb\u884c\u4e00\u7cfb\u5217\u4f18\u5316\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from wordcloud import WordCloud, STOPWORDS<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>import numpy as np<\/p>\n<p>from PIL import Image<\/p>\n<h2><strong>\u51c6\u5907\u6587\u672c\u6570\u636e<\/strong><\/h2>\n<p>text = &quot;&quot;&quot;<\/p>\n<p>Python is an interpreted high-level general-purpose programming language. <\/p>\n<p>Python&#39;s design philosophy emphasizes code readability with its notable use of significant indentation. <\/p>\n<p>Its language constructs as well as its object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.<\/p>\n<p>&quot;&quot;&quot;<\/p>\n<h2><strong>\u52a0\u8f7d\u8499\u7248\u56fe\u7247<\/strong><\/h2>\n<p>mask = np.array(Image.open(&#39;mask.png&#39;))<\/p>\n<h2><strong>\u6dfb\u52a0\u81ea\u5b9a\u4e49\u505c\u7528\u8bcd<\/strong><\/h2>\n<p>stopwords = set(STOPWORDS)<\/p>\n<p>stopwords.update([&quot;Python&quot;, &quot;programming&quot;])<\/p>\n<h2><strong>\u5b9a\u4e49\u989c\u8272\u51fd\u6570<\/strong><\/h2>\n<p>def grey_color_func(word, font_size, position, orientation, random_state=None, kwargs):<\/p>\n<p>    return &quot;hsl(0, 0%%, %d%%)&quot; % np.random.randint(60, 100)<\/p>\n<h2><strong>\u751f\u6210\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>wordcloud = WordCloud(width=800, height=400, background_color=&#39;white&#39;, stopwords=stopwords, mask=mask, max_words=100, min_font_size=10).generate(text)<\/p>\n<h2><strong>\u5e94\u7528\u989c\u8272\u51fd\u6570<\/strong><\/h2>\n<p>wordcloud.recolor(color_func=grey_color_func)<\/p>\n<h2><strong>\u663e\u793a\u8bcd\u4e91\u56fe<\/strong><\/h2>\n<p>plt.figure(figsize=(10, 5))<\/p>\n<p>plt.imshow(wordcloud, interpolation=&#39;bilinear&#39;)<\/p>\n<p>plt.axis(&#39;off&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u5e94\u7528\u573a\u666f\u548c\u6ce8\u610f\u4e8b\u9879<\/h3>\n<\/p>\n<p><h4>1\u3001\u5e94\u7528\u573a\u666f<\/h4>\n<\/p>\n<p><p>\u8bcd\u4e91\u56fe\u5728\u8bb8\u591a\u9886\u57df\u90fd\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u5e02\u573a\u8c03\u7814<\/strong>\uff1a\u5206\u6790\u6d88\u8d39\u8005\u8bc4\u8bba\uff0c\u8bc6\u522b\u70ed\u95e8\u8bdd\u9898\u548c\u5173\u952e\u5b57\u3002<\/li>\n<li><strong>\u793e\u4ea4\u5a92\u4f53\u5206\u6790<\/strong>\uff1a\u5206\u6790\u793e\u4ea4\u5a92\u4f53\u4e0a\u7684\u8bdd\u9898\u8d8b\u52bf\u548c\u7528\u6237\u60c5\u611f\u3002<\/li>\n<li><strong>\u6587\u732e\u7814\u7a76<\/strong>\uff1a\u5206\u6790\u5b66\u672f\u8bba\u6587\u4e2d\u7684\u5173\u952e\u8bcd\u548c\u4e3b\u9898\u3002<\/li>\n<\/ul>\n<p><h4>2\u3001\u6ce8\u610f\u4e8b\u9879<\/h4>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u8fd8\u9700\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u6570\u636e\u6e05\u6d17<\/strong>\uff1a\u786e\u4fdd\u6587\u672c\u6570\u636e\u5e72\u51c0\u65e0\u8bef\uff0c\u53bb\u9664\u65e0\u5173\u5b57\u7b26\u548c\u7b26\u53f7\u3002<\/li>\n<li><strong>\u505c\u7528\u8bcd\u5904\u7406<\/strong>\uff1a\u6839\u636e\u5b9e\u9645\u9700\u6c42\u81ea\u5b9a\u4e49\u505c\u7528\u8bcd\u5217\u8868\u3002<\/li>\n<li><strong>\u8bcd\u9891\u5206\u6790<\/strong>\uff1a\u5408\u7406\u8bbe\u7f6e\u8bcd\u9891\u9608\u503c\uff0c\u907f\u514d\u91cd\u8981\u8bcd\u8bed\u88ab\u5ffd\u7565\u3002<\/li>\n<li><strong>\u56fe\u5f62\u4f18\u5316<\/strong>\uff1a\u6839\u636e\u5177\u4f53\u9700\u6c42\u8c03\u6574\u8bcd\u4e91\u56fe\u7684\u5f62\u72b6\u3001\u989c\u8272\u548c\u5e03\u5c40\u3002<\/li>\n<\/ul>\n<p><h3>\u516b\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u7528Python\u5236\u4f5c\u8bcd\u4e91\u56fe\u4e0d\u4ec5\u7b80\u5355\uff0c\u800c\u4e14\u975e\u5e38\u7075\u6d3b\u3002\u901a\u8fc7\u5b89\u88c5\u76f8\u5173\u5e93\u3001\u51c6\u5907\u6587\u672c\u6570\u636e\u3001\u751f\u6210\u8bcd\u4e91\u56fe\u3001\u53ef\u89c6\u5316\u548c\u4f18\u5316\u8bcd\u4e91\u56fe\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u751f\u6210\u9ad8\u8d28\u91cf\u7684\u8bcd\u4e91\u56fe\u3002\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u80fd\u591f\u5e2e\u52a9\u5927\u5bb6\u66f4\u597d\u5730\u7406\u89e3\u548c\u638c\u63e1\u8bcd\u4e91\u56fe\u7684\u5236\u4f5c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5f00\u59cb\u4f7f\u7528Python\u5236\u4f5c\u8bcd\u4e91\u56fe\uff1f<\/strong><br \/>\u8981\u5f00\u59cb\u5236\u4f5c\u8bcd\u4e91\u56fe\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5\u76f8\u5173\u7684Python\u5e93\u3002\u5e38\u7528\u7684\u5e93\u5305\u62ec<code>wordcloud<\/code>\u3001<code>matplotlib<\/code>\u548c<code>numpy<\/code>\u3002\u53ef\u4ee5\u901a\u8fc7<code>pip install wordcloud matplotlib numpy<\/code>\u547d\u4ee4\u6765\u5b89\u88c5\u8fd9\u4e9b\u5e93\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u5bfc\u5165\u6587\u672c\u6570\u636e\uff0c\u4f7f\u7528<code>WordCloud<\/code>\u7c7b\u751f\u6210\u8bcd\u4e91\uff0c\u5e76\u5229\u7528<code>matplotlib<\/code>\u5c55\u793a\u51fa\u6765\u3002<\/p>\n<p><strong>\u6211\u53ef\u4ee5\u7528\u54ea\u4e9b\u6587\u672c\u6570\u636e\u6765\u751f\u6210\u8bcd\u4e91\u56fe\uff1f<\/strong><br \/>\u51e0\u4e4e\u4efb\u4f55\u6587\u672c\u6570\u636e\u90fd\u53ef\u4ee5\u7528\u6765\u751f\u6210\u8bcd\u4e91\u56fe\u3002\u5e38\u89c1\u7684\u6587\u672c\u6765\u6e90\u5305\u62ec\u65b0\u95fb\u6587\u7ae0\u3001\u793e\u4ea4\u5a92\u4f53\u5e16\u5b50\u3001\u4e66\u7c4d\u5185\u5bb9\u3001\u7528\u6237\u8bc4\u8bba\u7b49\u3002\u786e\u4fdd\u6587\u672c\u5185\u5bb9\u8db3\u591f\u4e30\u5bcc\uff0c\u4ee5\u4fbf\u751f\u6210\u7684\u8bcd\u4e91\u80fd\u591f\u53cd\u6620\u51fa\u4e3b\u8981\u7684\u5173\u952e\u8bcd\u548c\u4e3b\u9898\u3002\u5bf9\u4e8e\u7279\u5b9a\u4e3b\u9898\uff0c\u60a8\u53ef\u4ee5\u624b\u52a8\u9009\u62e9\u6587\u672c\u6570\u636e\u6216\u4f7f\u7528\u7f51\u7edc\u722c\u866b\u6280\u672f\u83b7\u53d6\u6570\u636e\u3002<\/p>\n<p><strong>\u8bcd\u4e91\u56fe\u7684\u6837\u5f0f\u548c\u5916\u89c2\u53ef\u4ee5\u5b9a\u5236\u5417\uff1f<\/strong><br \/>\u5f53\u7136\u53ef\u4ee5\uff0cPython\u7684<code>wordcloud<\/code>\u5e93\u63d0\u4f9b\u4e86\u591a\u79cd\u53c2\u6570\u6765\u5b9a\u5236\u8bcd\u4e91\u56fe\u7684\u5916\u89c2\u3002\u60a8\u53ef\u4ee5\u8c03\u6574\u5b57\u4f53\u3001\u989c\u8272\u3001\u5f62\u72b6\u3001\u80cc\u666f\u8272\u7b49\u5c5e\u6027\u3002\u901a\u8fc7\u8bbe\u7f6e<code>font_path<\/code>\u6765\u9009\u62e9\u4e0d\u540c\u7684\u5b57\u4f53\uff0c\u4f7f\u7528<code>background_color<\/code>\u6765\u5b9a\u4e49\u80cc\u666f\u989c\u8272\uff0c\u751a\u81f3\u53ef\u4ee5\u901a\u8fc7<code>mask<\/code>\u53c2\u6570\u52a0\u8f7d\u81ea\u5b9a\u4e49\u5f62\u72b6\u7684\u56fe\u50cf\uff0c\u4f7f\u8bcd\u4e91\u56fe\u5448\u73b0\u51fa\u4e0d\u540c\u7684\u89c6\u89c9\u6548\u679c\u3002\u8fd9\u4e9b\u5b9a\u5236\u9009\u9879\u53ef\u4ee5\u5e2e\u52a9\u60a8\u521b\u5efa\u72ec\u7279\u4e14\u5438\u5f15\u4eba\u7684\u8bcd\u4e91\u56fe\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u7528Python\u5236\u4f5c\u8bcd\u4e91\u56fe\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u5e38\u89c1\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u5b89\u88c5\u76f8\u5173\u5e93\u3001\u51c6\u5907\u6587\u672c\u6570\u636e\u3001\u751f\u6210\u8bcd\u4e91\u56fe\u3001\u53ef\u89c6\u5316\u548c\u4f18\u5316\u8bcd\u4e91\u56fe [&hellip;]","protected":false},"author":3,"featured_media":1187719,"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\/1187701"}],"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=1187701"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1187701\/revisions"}],"predecessor-version":[{"id":1187721,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1187701\/revisions\/1187721"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1187719"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1187701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1187701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1187701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}