I am trying to create seaborn lmplot for a clustering result, data example are shown below:
ID CA IP clusters
38 10.3 5.6 1
59 10.4 6.1 0
64 10.0 6.6 1
35 10.6 5.6 1
54 10.6 5.6 1
60 10.2 8.2 1
There are two clusters (cluster 0 and cluster 1), and I want to show the "ID" based on "ID" column on each scatter. Tried the function of adding text as in seaborn regplot but there are errors saying "FacetGrid does not have text function".
Codes for seaborn plot:
ax = sns.lmplot('CA', 'IP',
data=df_tr,
fit_reg=False,
hue="clusters", palette="Set1",
scatter_kws={"marker": "D", "s": 50})
plt.title('Calcium vs Phosporus')
plt.xlabel('CA')
plt.ylabel('IP')
And the plot:
