This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
cs401r_w2016:lab7 [2018/02/23 17:24] wingated |
cs401r_w2016:lab7 [2021/06/30 23:42] (current) |
||
|---|---|---|---|
| Line 138: | Line 138: | ||
| # assumes that "mus" contains a list of Gaussian means, and that "covs" is a list of Gaussian covariances | # assumes that "mus" contains a list of Gaussian means, and that "covs" is a list of Gaussian covariances | ||
| + | # also assumes you are running in Jupyter Notebook | ||
| + | |||
| + | from IPython.display import clear_output | ||
| + | |||
| for t in range(0, data.shape[0]): | for t in range(0, data.shape[0]): | ||
| Line 154: | Line 158: | ||
| plt.xlim([1, 360]) | plt.xlim([1, 360]) | ||
| plt.ylim([243,1]) | plt.ylim([243,1]) | ||
| - | | + | clear_output(wait = True) |
| plt.pause(0.01) | plt.pause(0.01) | ||
| </code> | </code> | ||