Skip to content

Instantly share code, notes, and snippets.

@AayushSameerShah
Created May 11, 2021 13:06
Show Gist options
  • Save AayushSameerShah/f2c70836dae26eac34981f9d272528ac to your computer and use it in GitHub Desktop.
Save AayushSameerShah/f2c70836dae26eac34981f9d272528ac to your computer and use it in GitHub Desktop.
Text on Graph (Bar values)
x = ["A", "B", "C", "D"]
y = [1, 2, 3, 4]
plt.barh(x, y)
for index, value in enumerate(y):
plt.text(value, index, str(value))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment