About 50 results
Open links in new tab
  1. python - How to specify legend position in graph coordinates

    The location can also be a 2-tuple giving the coordinates of the lower-left corner of the legend in axes coordinates (in which case bbox_to_anchor will be ignored).

  2. python - How to put the legend outside the plot - Stack Overflow

    seaborn is a high-level api for matplotlib. From seaborn v0.11.2, there is sns.move_legend as shown at Move seaborn plot legend to a different position. All of the parameters for .legend …

  3. python - Get Matplotlib legend location? - Stack Overflow

    Feb 25, 2015 · Accessing legend object position after this will return figure pixels which you can use later. There are at least two ways to access legend position: A universal way through …

  4. python - How to position and align a matplotlib figure legend?

    In this case, you can either use axes for figure legend methods. In either case, bbox_to_anchor is the key. As you've already noticed bbox_to_anchor specifies a tuple of coordinates (or a box) …

  5. python - Matplotlib: Adjust legend location/position - Stack …

    What I'd like to do is to have the legend placed somewhere in between the 'upper left' and 'center left' locations, while keeping the padding between it and the y-axis equal to the legends in the …

  6. python - matplotlib legend location numbers - Stack Overflow

    May 31, 2012 · 43 I am beginning to use Python for my scientific computing, and I am really liking it a lot, however I am confused by a feature of the matplotlib.pylab.legend function. In …

  7. python - Legend location in matplotlib subplot - Stack Overflow

    Apr 2, 2019 · Legend location in matplotlib subplot Asked 6 years, 10 months ago Modified 2 years, 5 months ago Viewed 17k times

  8. python - 'best' location for legend is covering text - Stack Overflow

    Jan 10, 2022 · Thanks @felixk. It doesn't answer my question. The answer suggests moving it "by hand". I am having many plots. In all of them the text in the same place, but 'best' location …

  9. python - Changing position of matplotlib plot legend - Stack …

    Jul 11, 2021 · It's well written in the docs. You need to use the loc parameter to select the location of the legend. Try to use bbox_to_anchor=(x, y, width, height) as well (maybe with negative …

  10. python - Restricting Matplotlib Legend Best Location options

    Feb 25, 2022 · In Matplotlib, the legend has a parameter loc that allows to specify the location of the legend. The user can force the legend to be in 9 different locations or let matplotlib decide …