Adding legends to plots with mapped labels

Hello Everyone,

Is there a solution for the question posted here