<jupyter_start><jupyter_text><jupyter_code>import numpy as np

data = np.random.uniform(0, 1, (64, 75))
X = np.linspace(-1, 1, data.shape[-1])
G = 1.5 * np.exp(-4 * X ** 2)


import matplotlib.pyplot as plt
fig = plt.figure(figsize=(8, 8))
ax = plt.subplot(111, frameon=False)
lines = []
for i in range(data.shape[0]):
    xscale = 1 - i / 200.0
    lw = 1 - i / 100.0
    line, = ax.plot(xscale * X, i + G * data[i], color="k", lw=lw)
    lines.append(line)
import matplotlib.animation as animation
ax.set_xticks([])
ax.set_yticks([])
ax.text(0.5, 1.0, "MATPLOTLIB ", transform=ax.transAxes, ha="right", va="bottom", color="k", 
        family="sans-serif", fontweight="bold", fontsize=16)
ax.text(0.5, 1.0, "DYNAMIC", transform=ax.transAxes, ha="left", va="bottom", color="k",
        family="sans-serif", fontweight="light", fontsize=20)
def update(*args):
    data[:, 1:] = data[:, :-1]
    data[:, 0] = np.random.uniform(0, 1, len(data))
    for i in range(len(data)):
        lines[i].set_ydata(i + G * data[i])
anim = animation.FuncAnimation(fig, update, interval=200)
plt.show()
from IPython.display import HTML

ani = animation.FuncAnimation(fig, update, 19, interval=400, blit=False)
HTML(ani.to_html5_video())<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1944, 'fraction_numerical': 0.044, 'mean_word_length': 4.2784810126582276, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '425025', 'license': 'MIT', 'n_tokens_mistral': 532, 'n_tokens_neox': 496, 'n_words': 110, 'path': 'graph_animation.ipynb', 'repo_name': 'heungsikyu/colab-study', 'size': '1250'}