Quantcast
Channel: How to specify legend position in graph coordinates - Stack Overflow
Viewing all articles
Browse latest Browse all 12

Answer by Jefeter_7 for How to specify legend position in matplotlib in graph coordinates

$
0
0

Way I use very often is loc argument in the legend function. String input works well:

plt.legend(loc = "upper left")

As documentation says, for the string referencing you can use:

        ===============   =============        Location String   Location Code        ===============   ============='best'            0'upper right'     1'upper left'      2'lower left'      3'lower right'     4'right'           5'center left'     6'center right'    7'lower center'    8'upper center'    9'center'          10        ===============   =============

Viewing all articles
Browse latest Browse all 12

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>