I am trying to plot a legend for my ternary scatterplot, where I have colored the points based on if they are categorized as "Iv", "SK" or "St", but for some reason, only the first point "Iv" shows up in the legend. Does anyone have any idea why this is happening?
t = df.loc['591686B' : '591697C2','C']
l = df.loc['591686B' : '591697C2', 'O']
r = df.loc['591686B' : '591697C2','P']
colors = {'Iv':'red', 'SK':'green', 'St':'blue'}
fig = plt.figure(figsize=(20,10))
ax = plt.subplot(projection='ternary')
plot = ax.scatter(t, l, r, s=50, c=df['Locality'].map(colors), alpha=0.8, edgecolors='black', marker="o", linewidths=0.3)
plt.grid()
ax.legend(('Iv','SK', 'St'))
ax.set_tlabel('C')
ax.set_llabel('O')
ax.set_rlabel('P')
plt.show()