Skip to content

Instantly share code, notes, and snippets.

@vchrombie
Created October 6, 2020 13:31
Show Gist options
  • Save vchrombie/358036938b65a3b24cb5d85e5ec4069c to your computer and use it in GitHub Desktop.
Save vchrombie/358036938b65a3b24cb5d85e5ec4069c to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
semesters = [1, 2, 3, 4, 5, 6, 7, 8]
grades = [9.08, 8.14, 8.43, 7.89, 8.34, 7.55, 7.84, 9.06]
fig, ax = plt.subplots(figsize=(10,8))
ax.plot(semesters, grades, '-o')
ax.set(title="Grades: Venu (U4CSE16508)",
xlabel="Semester",
ylabel="GPA")
for xs, ys in zip(semesters, grades):
plt.annotate(str(ys), (xs, ys),
textcoords="offset points",
xytext=(0,10), ha='right')
#plt.savefig("grades-venu.png")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment