擅长:python、mysql、java
<p>使用<a href="http://seaborn.pydata.org/generated/seaborn.tsplot.html?highlight=stack" rel="nofollow noreferrer">seaborn</a>。来自@MaxNoe的数据</p>
<pre><code>import numpy as np
import seaborn as sns
# just some random numbers to get startet
x = np.random.uniform(-2, 2, 10000)
y = np.random.normal(x**2, np.abs(x) + 1)
sns.regplot(x=x, y=y, x_bins=10, fit_reg=None)
</code></pre>
<p><a href="https://i.stack.imgur.com/vXo8m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vXo8m.png" alt="enter image description here"/></a></p>
<p>你可以做得更多(误差带来自bootstrap,你可以改变y轴上的估计器,添加回归…)</p>