Created
July 4, 2021 16:43
-
-
Save prakhar21/96679c997a21e139a44bf75d0ad1f157 to your computer and use it in GitHub Desktop.
plot
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
y = readability_scores | |
N = len(y) | |
x = [i+1 for i in range(N)] | |
width = 1/1.5 | |
mini = min(readability_scores) | |
maxi = max(readability_scores) | |
pylab.title("Readability Comparison of text") | |
pylab.xlabel("Book") | |
pylab.ylabel("Readability Score") | |
colors = ["yellow"]*7 | |
colors[readability_scores.index(mini)] = "green" | |
colors[readability_scores.index(maxi)] = "red" | |
plt.bar(x, y, width, align='center', color=colors) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment