I have a set of data and I want to cluster them by the year! at the end I want to show each color is related to which year? this i my code:
col = [x[0].get_year() for x in vectors]
plt.scatter(X_train_pca[:, 0], X_train_pca[:, 1], c=col)
n=[x[0].title for x in vectors]
for i, txt in enumerate(n):
plt.annotate(_(txt), (x[i], y[i]))
plt.title("Poem Clustering by year")
plt.savefig(newpath+"Clustering_by_year"+".png", bbox_inches='tight')
print("DONE!")
And This is what I mean! I want just something similar to this.
I don't know how to search for this, I try, but I can't find anything related.