Explicitly state that the locations are positions within a given box (configurable via bbox_to_anchor, default: Axes box)
Replace
The strings 'upper left', 'upper right', 'lower left', 'lower right' place the legend at the corresponding corner of the axes.
The strings 'upper center', 'lower center', 'center left', 'center right' place the legend at the center of the corresponding edge of the axes.
The string 'center' places the legend at the center of the axes.
By Add a visual similar to the cheat sheet
but with the string names in the respective positions.
Parameter bbox_to_anchor
Make it more clear that this is an advanced option for free placement
Activity
story645 commented on Aug 29, 2023
xref #10079
amanparganiha commented on Mar 29, 2026
I'm working on a fix for this. Will open a PR shortly.
Improve legend loc and bbox_to_anchor documentation (matplotlib#26620)
Improve legend loc and bbox_to_anchor documentation (#26620) (#31422)