Created
May 11, 2021 13:06
-
-
Save AayushSameerShah/f2c70836dae26eac34981f9d272528ac to your computer and use it in GitHub Desktop.
Text on Graph (Bar values)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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