{"id":150034,"date":"2024-05-06T10:53:24","date_gmt":"2024-05-06T02:53:24","guid":{"rendered":""},"modified":"2024-05-06T10:53:27","modified_gmt":"2024-05-06T02:53:27","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e4%bd%9c%e5%9b%be","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/150034.html","title":{"rendered":"\u5982\u4f55\u7528python\u4f5c\u56fe"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27143525\/ff038431-aaf6-458f-a8ce-33e32b17ec87.webp\" alt=\"\u5982\u4f55\u7528python\u4f5c\u56fe\" \/><\/p>\n<p><p><strong>Python\u4f5c\u56fe<\/strong>\u662f\u4e00\u4e2a\u6d89\u53ca\u591a\u4e2a\u5e93\u548c\u5de5\u5177\u7684\u8fc7\u7a0b\uff0c\u4e3b\u8981\u6d89\u53ca\u5230\u7684\u5e93\u5305\u62ec<strong>Matplotlib\u3001Seaborn\u3001Plotly\u3001Bokeh<\/strong>\u7b49\u3002\u5176\u4e2d\uff0c<strong>Matplotlib<\/strong>\u662f\u6700\u5e38\u7528\u7684\u4e00\u4e2a\uff0c\u56e0\u4e3a\u5b83\u529f\u80fd\u5168\u9762\u3001\u7075\u6d3b\uff0c\u9002\u5408\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u8868\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u521b\u5efa\u6761\u5f62\u56fe\u3001\u76f4\u65b9\u56fe\u3001\u6563\u70b9\u56fe\u3001\u6298\u7ebf\u56fe\u7b49\u3002\u800c<strong>Seaborn<\/strong>\u5219\u5efa\u7acb\u5728Matplotlib\u4e4b\u4e0a\uff0c\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u7ed8\u56fe\u6a21\u5f0f\u548c\u7f8e\u89c2\u7684\u9ed8\u8ba4\u6837\u5f0f\u3002<strong>Plotly<\/strong> \u548c <strong>Bokeh<\/strong> \u5219\u5f3a\u8c03\u4ea4\u4e92\u6027\uff0c\u7279\u522b\u9002\u5408\u4e8e\u6784\u5efa\u590d\u6742\u7684\u52a8\u6001\u56fe\u8868\u3002<\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u5728\u66f4\u8be6\u7ec6\u7684\u5185\u5bb9\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u6df1\u5165\u63a2\u7d22\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u5e93\uff0c\u4ee5\u53ca\u5b83\u4eec\u7684\u7279\u70b9\uff1a<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528MATPLOTLIB\u4f5c\u56fe<\/h3>\n<\/p>\n<p><p>Matplotlib\u662fPython\u4e2d\u6700\u8457\u540d\u7684\u7ed8\u56fe\u5e93\u4e4b\u4e00\u3002\u5b83\u63d0\u4f9b\u7684<code>pyplot<\/code>\u6a21\u5757\u5c24\u5176\u53d7\u6b22\u8fce\uff0c\u56e0\u4e3a\u5b83\u7684\u64cd\u4f5c\u65b9\u5f0f\u7c7b\u4f3c\u4e8eMATLAB\u3002<\/p>\n<\/p>\n<p><h4>\u57fa\u672c\u4f5c\u56fe<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Matplotlib\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u5b89\u88c5\u547d\u4ee4<code>pip install matplotlib<\/code>\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5c31\u53ef\u4ee5\u5f00\u59cb\u7ed8\u5236\u57fa\u672c\u7684\u56fe\u8868\u4e86\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u51c6\u5907\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [1, 4, 9, 16, 25]<\/p>\n<h2><strong>\u7ed8\u5236\u6298\u7ebf\u56fe<\/strong><\/h2>\n<p>plt.plot(x, y)<\/p>\n<p>plt.title(&#039;Line Chart&#039;)<\/p>\n<p>plt.xlabel(&#039;X Axis&#039;)<\/p>\n<p>plt.ylabel(&#039;Y Axis&#039;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\uff0c<code>plot<\/code>\u51fd\u6570\u7528\u4e8e\u753b\u51fax\u548cy\u6570\u7ec4\u4e2d\u5b9a\u4e49\u7684\u70b9\uff0c\u5e76\u9ed8\u8ba4\u4ee5\u6298\u7ebf\u56fe\u7684\u5f62\u5f0f\u663e\u793a\u3002<code>title<\/code>, <code>xlabel<\/code>, \u548c <code>ylabel<\/code> \u51fd\u6570\u5206\u522b\u7528\u4e8e\u8bbe\u7f6e\u56fe\u8868\u7684\u6807\u9898\u548cX\u3001Y\u8f74\u7684\u6807\u9898\u3002\u6700\u540e\uff0c<code>show<\/code> \u51fd\u6570\u5c06\u56fe\u8868\u5c55\u793a\u51fa\u6765\u3002<\/p>\n<\/p>\n<p><h4>\u9ad8\u7ea7\u7ed8\u56fe<\/h4>\n<\/p>\n<p><p>Matplotlib\u4e5f\u652f\u6301\u66f4\u591a\u9ad8\u7ea7\u7684\u56fe\u8868\u529f\u80fd\uff0c\u6bd4\u5982\u5b50\u56fe\u3001\u4e0d\u540c\u7684\u56fe\u8868\u7c7b\u578b\uff08\u5982\u6761\u5f62\u56fe\u3001\u76f4\u65b9\u56fe\u7b49\uff09\u4ee5\u53ca\u9ad8\u7ea7\u7684\u81ea\u5b9a\u4e49\u9009\u9879\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fig, ax = plt.subplots(2, 2, figsize=(10, 10))<\/p>\n<h2><strong>\u7b2c\u4e00\u4e2a\u5b50\u56fe<\/strong><\/h2>\n<p>ax[0, 0].plot(x, y)<\/p>\n<p>ax[0, 0].set_title(&#039;Subplot 1&#039;)<\/p>\n<h2><strong>\u7b2c\u4e8c\u4e2a\u5b50\u56fe<\/strong><\/h2>\n<p>ax[0, 1].bar(x, y)<\/p>\n<p>ax[0, 1].set_title(&#039;Subplot 2&#039;)<\/p>\n<h2><strong>\u7b2c\u4e09\u4e2a\u5b50\u56fe<\/strong><\/h2>\n<p>ax[1, 0].hist(y)<\/p>\n<p>ax[1, 0].set_title(&#039;Subplot 3&#039;)<\/p>\n<h2><strong>\u7b2c\u56db\u4e2a\u5b50\u56fe<\/strong><\/h2>\n<p>ax[1, 1].scatter(x, y)<\/p>\n<p>ax[1, 1].set_title(&#039;Subplot 4&#039;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528SEABORN\u4f5c\u56fe<\/h3>\n<\/p>\n<p><p>Seaborn\u662f\u5728Matplotlib\u7684\u57fa\u7840\u4e0a\u7684\u4e00\u4e2a\u53ef\u89c6\u5316\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u7ed8\u56fe\u9009\u9879\uff0c\u5e76\u9ed8\u8ba4\u6709\u7740\u66f4\u4f18\u96c5\u7684\u6837\u5f0f\u3002<\/p>\n<\/p>\n<p><h4>\u5feb\u901f\u7ed8\u56fe<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5Seaborn\u4e5f\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981<code>pip install seaborn<\/code>\u5373\u53ef\u3002\u5b83\u7684\u6700\u5927\u4f18\u70b9\u662f\u53ef\u4ee5\u5feb\u901f\u521b\u5efa\u4e00\u4e2a\u8f83\u4e3a\u590d\u6742\u7684\u56fe\u8868\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import seaborn as sns<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u52a0\u8f7dseaborn\u81ea\u5e26\u7684\u6570\u636e\u96c6<\/strong><\/h2>\n<p>tips = sns.load_dataset(&quot;tips&quot;)<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u5e26\u6709\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u7684\u6563\u70b9\u56fe<\/strong><\/h2>\n<p>sns.lmplot(x=&quot;total_bill&quot;, y=&quot;tip&quot;, data=tips)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u7edf\u8ba1\u56fe\u8868<\/h4>\n<\/p>\n<p><p>Seaborn\u64c5\u957f\u4e8e\u521b\u5efa\u5404\u79cd\u7edf\u8ba1\u56fe\u8868\uff0c\u4f8b\u5982\u7bb1\u7ebf\u56fe\u3001\u5c0f\u63d0\u7434\u56fe\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u7bb1\u7ebf\u56fe<\/p>\n<p>plt.figure(figsize=(10,6))<\/p>\n<p>sns.boxplot(x=&quot;day&quot;, y=&quot;total_bill&quot;, data=tips)<\/p>\n<p>plt.show()<\/p>\n<h2><strong>\u5c0f\u63d0\u7434\u56fe<\/strong><\/h2>\n<p>plt.figure(figsize=(10,6))<\/p>\n<p>sns.violinplot(x=&quot;day&quot;, y=&quot;total_bill&quot;, data=tips)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528PLOTLY\u4f5c\u56fe<\/h3>\n<\/p>\n<p><p>Plotly\u662f\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u56fe\u8868\u5e93\uff0c\u5b83\u652f\u6301\u521b\u5efa\u591a\u79cd\u52a8\u6001\u7684\u3001\u4ea4\u4e92\u6027\u5f3a\u7684\u56fe\u8868\u3002\u53ef\u4ee5\u901a\u8fc7\u5176\u5728\u7ebf\u670d\u52a1\u6216\u8005\u5e93\u529f\u80fd\u5c06\u56fe\u8868\u5d4c\u5165\u7f51\u9875\u4e2d\u3002<\/p>\n<\/p>\n<p><h4>\u521b\u5efa\u4ea4\u4e92\u5f0f\u56fe\u8868<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5plotly\u4e5f\u662f\u4f7f\u7528pip\u5b89\u88c5\u547d\u4ee4<code>pip install plotly<\/code>\u3002\u751f\u6210\u7684\u56fe\u5f62\u53ef\u4ee5\u652f\u6301\u653e\u5927\u3001\u79fb\u52a8\u3001\u60ac\u505c\u6548\u679c\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import plotly.graph_objs as go<\/p>\n<p>from plotly.offline import iplot<\/p>\n<p>import plotly.express as px<\/p>\n<h2><strong>\u4f7f\u7528Plotly Express\u5feb\u901f\u521b\u5efa\u56fe\u8868<\/strong><\/h2>\n<p>df = px.data.tips()  # \u4f7f\u7528plotly\u81ea\u5e26\u7684\u6570\u636e\u96c6<\/p>\n<p>fig = px.scatter(df, x=&quot;total_bill&quot;, y=&quot;tip&quot;, color=&quot;size&quot;, marginal_y=&quot;violin&quot;,<\/p>\n<p>           marginal_x=&quot;box&quot;, trendline=&quot;ols&quot;, template=&quot;simple_white&quot;)<\/p>\n<p>iplot(fig)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ea4\u4e92\u56fe\u8868\u56e0\u4e3a\u652f\u6301\u7528\u6237\u64cd\u4f5c\uff0c\u975e\u5e38\u9002\u5408\u7f51\u7edc\u73af\u5883\u4e0b\u7684\u6570\u636e\u5c55\u793a\u3002<\/p>\n<\/p>\n<p><h4>\u9ad8\u7ea7\u5e94\u7528<\/h4>\n<\/p>\n<p><p>Plotly\u540c\u65f6\u652f\u6301\u8f83\u4e3a\u590d\u6742\u7684\u56fe\u8868\u7c7b\u578b\u548c\u5e03\u5c40\u8c03\u6574\uff0c\u80fd\u591f\u6ee1\u8db3\u4e13\u4e1a\u7528\u6237\u7684\u9700\u6c42\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fig = go.Figure(data=[<\/p>\n<p>    go.Bar(name=&#039;SF Zoo&#039;, x=[&#039;giraffes&#039;, &#039;orangutans&#039;, &#039;monkeys&#039;], y=[20, 14, 23]),<\/p>\n<p>    go.Bar(name=&#039;LA Zoo&#039;, x=[&#039;giraffes&#039;, &#039;orangutans&#039;, &#039;monkeys&#039;], y=[12, 18, 29])<\/p>\n<p>])<\/p>\n<h2><strong>Change the bar mode<\/strong><\/h2>\n<p>fig.update_layout(barmode=&#039;group&#039;)<\/p>\n<p>iplot(fig)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528BOKEH\u5236\u4f5c\u56fe\u8868<\/h3>\n<\/p>\n<p><p>Bokeh\u662f\u4e00\u79cd\u7528\u4e8e\u73b0\u4ee3\u7f51\u9875\u6d4f\u89c8\u5668\u7684\u4ea4\u4e92\u5f0f\u53ef\u89c6\u5316\u5e93\u3002\u5b83\u63d0\u4f9b\u4e86\u4f18\u7f8e\u7684\u3001Web\u53cb\u597d\u7684\u56fe\u8868\uff0c\u9002\u5408\u7f51\u7edc\u5c55\u793a\u3002<\/p>\n<\/p>\n<p><h4>\u57fa\u672c\u56fe\u8868\u7ed8\u5236<\/h4>\n<\/p>\n<p><p>Bokeh\u7684\u6807\u5fd7\u6027\u529f\u80fd\u662f\u5b83\u7684\u6d41\u7545\u6027\u548c\u9ad8\u5ea6\u7684\u7528\u6237\u4ea4\u4e92\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bokeh.plotting import figure, output_file, show<\/p>\n<h2><strong>\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [6, 7, 2, 4, 5]<\/p>\n<h2><strong>\u8f93\u51fa\u5230\u9759\u6001 HTML \u6587\u4ef6<\/strong><\/h2>\n<p>output_file(&quot;lines.html&quot;)<\/p>\n<p>p = figure(title=&quot;simple line example&quot;, x_axis_label=&#039;x&#039;, y_axis_label=&#039;y&#039;)<\/p>\n<p>p.line(x, y, legend_label=&quot;Temp.&quot;, line_width=2)<\/p>\n<h2><strong>\u5c55\u793a\u7ed3\u679c<\/strong><\/h2>\n<p>show(p)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4ea4\u4e92\u5f0f\u56fe\u8868<\/h4>\n<\/p>\n<p><p>Bokeh\u652f\u6301\u7684\u4ea4\u4e92\u65b9\u5f0f\u5305\u62ec\u70b9\u51fb\u3001\u60ac\u505c\u3001\u62d6\u62fd\u7b49\uff0c\u975e\u5e38\u9002\u5408\u521b\u5efa\u590d\u6742\u7684\u4ea4\u4e92\u5f0f\u6570\u636e\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bokeh.models import ColumnDataSource, HoverTool<\/p>\n<p>source = ColumnDataSource(data=dict(<\/p>\n<p>    x=[1, 2, 3, 4, 5],<\/p>\n<p>    y=[6, 7, 2, 4, 5],<\/p>\n<p>    desc=[&#039;A&#039;, &#039;B&#039;, &#039;C&#039;, &#039;D&#039;, &#039;E&#039;],<\/p>\n<p>))<\/p>\n<p>p = figure(plot_width=400, plot_height=400, tools=&quot;&quot;, toolbar_location=None, title=&quot;Mouse over the dots&quot;)<\/p>\n<p>p.circle(&#039;x&#039;, &#039;y&#039;, size=20, source=source)<\/p>\n<p>hover = HoverTool()<\/p>\n<p>hover.tooltips=[<\/p>\n<p>    (&quot;Index&quot;, &quot;$index&quot;),<\/p>\n<p>    (&quot;(x,y)&quot;, &quot;($x, $y)&quot;),<\/p>\n<p>    (&quot;Desc&quot;, &quot;@desc&quot;),<\/p>\n<p>]<\/p>\n<p>p.add_tools(hover)<\/p>\n<p>show(p)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0a\u4fbf\u662f\u4f7f\u7528Python\u8fdb\u884c\u6570\u636e\u53ef\u89c6\u5316\u7684\u4e00\u4e9b\u5e38\u89c1\u5e93\u548c\u57fa\u672c\u7528\u6cd5\uff0c<strong>Python\u5145\u6ee1\u4e86\u65e0\u9650\u7684\u53ef\u80fd<\/strong>\uff0c\u901a\u8fc7\u4e0d\u540c\u7684\u5e93\u548c\u5de5\u5177\u4f60\u53ef\u4ee5\u521b\u5efa\u51fa\u5343\u53d8\u4e07\u5316\u7684\u56fe\u8868\uff0c\u4e3a\u6570\u636e\u5206\u6790\u4e0e\u5c55\u793a\u63d0\u4f9b\u5f3a\u5927\u7684\u89c6\u89c9\u652f\u6301\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u6211\u5e94\u8be5\u9009\u62e9\u54ea\u4e2a\u8f6f\u4ef6\u5305\u6765\u4f7f\u7528Python\u8fdb\u884c\u7ed8\u56fe\uff1f<\/strong><\/p>\n<p>\u4f9d\u636e\u4f60\u7684\u9700\u6c42\uff0cPython\u63d0\u4f9b\u4e86\u8bb8\u591a\u4e0d\u540c\u7684\u8f6f\u4ef6\u5305\u7528\u4e8e\u4f5c\u56fe\u3002Matplotlib\u662f\u5176\u4e2d\u6700\u5e38\u7528\u7684\u8f6f\u4ef6\u5305\u4e4b\u4e00\uff0c\u5b83\u5177\u6709\u5e7f\u6cdb\u7684\u529f\u80fd\u548c\u7075\u6d3b\u6027\u3002\u53e6\u4e00\u4e2a\u6d41\u884c\u7684\u5305\u662fSeaborn\uff0c\u5b83\u6784\u5efa\u5728Matplotlib\u4e4b\u4e0a\uff0c\u5728\u53ef\u89c6\u5316\u65b9\u9762\u63d0\u4f9b\u4e86\u66f4\u7b80\u5316\u7684\u8bed\u6cd5\u3002\u5982\u679c\u4f60\u66f4\u503e\u5411\u4e8e\u4ea4\u4e92\u5f0f\u7ed8\u56fe\uff0cBokeh\u548cPlotly\u662f\u4e24\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002<\/p>\n<p><strong>2. \u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528Matplotlib\u7ed8\u5236\u57fa\u672c\u56fe\u5f62\uff1f<\/strong><\/p>\n<p>\u5728Python\u4e2d\u4f7f\u7528Matplotlib\u8fdb\u884c\u57fa\u672c\u56fe\u5f62\u7684\u7ed8\u5236\u975e\u5e38\u7b80\u5355\u3002\u4f60\u53ef\u4ee5\u5148\u5bfc\u5165Matplotlib\u5e93\uff0c\u7136\u540e\u4f7f\u7528plt.plot()\u51fd\u6570\u521b\u5efa\u4e00\u6761\u6298\u7ebf\u56fe\uff0c\u6216\u4f7f\u7528plt.scatter()\u51fd\u6570\u521b\u5efa\u6563\u70b9\u56fe\u3002\u5982\u679c\u4f60\u60f3\u7ed8\u5236\u67f1\u72b6\u56fe\uff0c\u53ef\u4ee5\u4f7f\u7528plt.bar()\u51fd\u6570\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528Matplotlib\u8fdb\u884c\u7ed8\u5236\u9762\u79ef\u56fe\u3001\u997c\u56fe\u3001\u76f4\u65b9\u56fe\u7b49\u3002\u6839\u636e\u6240\u9009\u62e9\u7684\u7ed8\u56fe\u7c7b\u578b\uff0c\u4f60\u53ef\u4ee5\u8bbe\u7f6e\u56fe\u5f62\u7684\u5c5e\u6027\uff0c\u5982\u989c\u8272\u3001\u6807\u7b7e\u3001\u8f74\u8303\u56f4\u7b49\u3002<\/p>\n<p><strong>3. \u6709\u6ca1\u6709\u66f4\u9ad8\u7ea7\u7684\u4f5c\u56fe\u5de5\u5177\u53ef\u4ee5\u4f7f\u7528\uff1f<\/strong><\/p>\n<p>\u9664\u4e86Matplotlib\u4e4b\u5916\uff0c\u8fd8\u6709\u5176\u4ed6\u4e00\u4e9b\u66f4\u9ad8\u7ea7\u7684\u4f5c\u56fe\u5de5\u5177\u53ef\u4f9b\u9009\u62e9\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u5e0c\u671b\u521b\u5efa\u4ea4\u4e92\u5f0f\u7684Web\u56fe\u8868\uff0c\u53ef\u4ee5\u4f7f\u7528Plotly\u5e93\u3002Plotly\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u53ef\u89c6\u5316\u529f\u80fd\uff0c\u5e76\u652f\u6301\u521b\u5efa\u52a8\u6001\u548c\u7f8e\u89c2\u7684\u56fe\u8868\u3002\u53e6\u4e00\u4e2a\u9009\u62e9\u662fSeaborn\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u66f4\u7b80\u5316\u7684\u8bed\u6cd5\u548c\u7f8e\u89c2\u7684\u9ed8\u8ba4\u6837\u5f0f\uff0c\u4f7f\u5f97\u521b\u5efa\u5404\u79cd\u5404\u6837\u7684\u7edf\u8ba1\u56fe\u8868\u975e\u5e38\u5bb9\u6613\u3002\u6b64\u5916\uff0cBokeh\u662f\u53e6\u4e00\u4e2a\u6d41\u884c\u7684\u5e93\uff0c\u5b83\u53ef\u4ee5\u751f\u6210\u9ad8\u6027\u80fd\u7684\u4ea4\u4e92\u5f0f\u56fe\u5f62\uff0c\u9002\u7528\u4e8e\u5927\u89c4\u6a21\u6570\u636e\u53ef\u89c6\u5316\u3002\u6839\u636e\u4f60\u7684\u9700\u6c42\u548c\u559c\u597d\uff0c\u9009\u62e9\u9002\u5408\u4f60\u7684\u5de5\u5177\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4f5c\u56fe\u662f\u4e00\u4e2a\u6d89\u53ca\u591a\u4e2a\u5e93\u548c\u5de5\u5177\u7684\u8fc7\u7a0b\uff0c\u4e3b\u8981\u6d89\u53ca\u5230\u7684\u5e93\u5305\u62ecMatplotlib\u3001Seaborn\u3001Plot [&hellip;]","protected":false},"author":3,"featured_media":150038,"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\/150034"}],"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=150034"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/150034\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/150038"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=150034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=150034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=150034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}