Skip to content

Instantly share code, notes, and snippets.

@jakelevi1996
Last active August 7, 2024 09:59
Show Gist options
  • Select an option

  • Save jakelevi1996/05c54c9a365c20c07b673b55c1dd5807 to your computer and use it in GitHub Desktop.

Select an option

Save jakelevi1996/05c54c9a365c20c07b673b55c1dd5807 to your computer and use it in GitHub Desktop.
Plot climbing scores
import numpy as np
from jutility import plotting
scores_list = [
[25.0, 25.0, 24.9, 24.7, 99.6, ],
[24.9, 24.9, 25.0, 9.7, 84.5, ],
[24.4, 24.9, 9.8, 24.6, 83.7, ],
[25.0, 24.9, 24.8, 4.9, 79.6, ],
[9.8, 25.0, 9.8, 24.6, 69.2, ],
[9.8, 10.0, 24.5, 24.5, 68.8, ],
[24.8, 24.6, 10.0, 5.0, 64.4, ],
[5.0, 24.5, 10.0, 24.5, 64.0, ],
[4.8, 24.9, 9.4, 24.5, 63.6, ],
[5.0, 24.7, 24.9, 5.0, 59.6, ],
[0.0, 24.6, 4.7, 24.7, 54.0, ],
[4.7, 24.7, 10.0, 9.9, 49.3, ],
[5.0, 24.8, 9.7, 4.7, 44.2, ],
[4.9, 24.8, 5.0, 4.8, 39.5, ],
[4.8, 10.0, 10.0, 4.9, 29.7, ],
[5.0, 9.7, 9.8, 4.7, 29.2, ],
[4.6, 9.9, 9.7, 4.2, 28.4, ],
[0.0, 4.4, 5.0, 3.8, 13.2, ],
[0.0, 4.8, 5.0, 0.0, 9.8, ],
[0.0, 0.0, 0.0, 0.0, 0.0],
]
scores = np.array(scores_list)
mp = plotting.MultiPlot(
*[
plotting.Subplot(
plotting.Hist(scores[:, i], np.arange(27)),
title="Boulder %i" % (i+1),
)
for i in range(4)
],
title="Women's Olympic bouldering semifinal",
top_space=0.15,
figsize=[10, 6],
)
mp.save("boulders")
plotting.plot(
plotting.Hist(scores[:, 4], np.arange(102)),
plot_name="Women's Olympic bouldering semifinal overall scores",
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment