Files
python-aoc-2020/day15/visualize.py
Sebastian Seedorf 20e80270ca Day 15 (visualize)
2020-12-15 23:10:09 +01:00

23 lines
415 B
Python

from day15.common import yield_numbers
from matplotlib import pyplot as plt
import numpy as np
data = list(map(lambda x: (x[1],len(x[2]),len(x[2])/x[0]), yield_numbers("0,3,6", 30000000)))
data = np.array(data)
plt.plot(
data[:,:2],
linestyle='none',
marker='.',
markersize=1
)
plt.show()
plt.plot(
data[:,2],
linestyle='none',
marker='.',
markersize=1,
color='g'
)
plt.show()