擅长:python、mysql、java
<p>使用<strong>seaborn</strong>。你知道吗</p>
<pre><code>import seaborn as sns
sns.factorplot(x="Date", y="Val", hue="Cat", col="Zone", data=df)
</code></pre>
<p><a href="https://i.stack.imgur.com/Au9Gw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Au9Gw.png" alt="output plot"/></a></p>
<p>更新'保存一系列单独的工厂图':</p>
<pre><code>for zone in df.Zone.unique():
fig = sns.factorplot(x="Date", y="Val", hue="Cat", col="Zone", data=df[df.Zone==zone])
fig.savefig("zone_{0}.png".format(zone))
</code></pre>