Created
January 7, 2021 21:09
-
-
Save brenoimatos/d23667179dc5b397e948cfb197eb8a4a to your computer and use it in GitHub Desktop.
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
# função adjust_text importada de https://github.com/Phlya/adjustText/blob/master/adjustText/__init__.py | |
x = df['Unique'] | |
y = df['Relative'] | |
annot = df.index | |
fig, ax = plt.subplots(figsize=(12, 15)) | |
ax.scatter(x, y) | |
texts = [] | |
for i, txt in enumerate(annot): | |
texts.append(ax.text(x[i], y[i], txt)) | |
adjust_text(texts) | |
plt.xlabel("#Palavras Únicas") | |
plt.ylabel("Relação #Palavras Únicas/#Palavras Totais") | |
ax.yaxis.set_major_formatter(mtick.PercentFormatter(1)) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment