1

I get a jointplot as following using sns.jointplot with kind="kde".

figure

and I want to move the text to the left corner, what should I do here? Thanks

Community
  • 1
  • 1
mrbean
  • 171
  • 2
  • 15

1 Answers1

2

You may change the location of the legend via the _set_loc() method. Possible locations are numbers from 0 to 10, which denote the edges of the axes.

g = sns.jointplot(...)
g.ax_joint.get_legend()._set_loc(4)

E.g. loc=4 is the lower right corner. The upper left corner would be loc=2

loc parameter [Image taken from this answer]

ImportanceOfBeingErnest
  • 321,279
  • 53
  • 665
  • 712