I have 4 columns in a dataframe: Country, City, Year and Temperature. I want to make plot as I did with this command:
g =sns.FacetGrid(grouped,col='Country',hue='City', col_wrap=3)
g = g.map(plt.plot,"year", "AverageTemperatureCelsius")
Now I can add a legend with:
g.add_legend(title='$\\bf{City}$',handlelength=1,prop={'size': 16})
Resulting in a plot like this:
But I want legend to be countries, meaning I would like the labels to be:
label=['Brazil', 'France', 'Japan', 'New Zealand', 'Poland', 'South Africa','Sweden', 'Ukraine']
And at each subplot there would be one colour, how can I achieve that?
The result I am after: