I have plotted 3D scatter plot for a KMeans model which I had fitted for RFM analysis. I used KMeans model labels for "color" groups. when I used legend(), it pops an error, "No handles with labels found to put in legend"
from mpl_toolkits.mplot3d import Axes3D
%matplotlib notebook
fig = plt.figure(figsize=(8, 6))
ax = fig.add_subplot(111, projection='3d')
xs = RFM['Recency'].dt.days
ys = RFM['Frequency']
zs = RFM['Value']
ax.scatter(xs, ys, zs, s=50, alpha=0.6, c=final_model.labels_, cmap='rainbow')
ax.set_xlabel('Recency(days)')
ax.set_ylabel('Frequency')
ax.set_zlabel('Value')
ax.legend()