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

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

$
0
0

In addition to @ImportanceOfBeingErnest's post, I use the following line to add a legend at an absolute position in a plot.

plt.legend(bbox_to_anchor=(1.0,1.0),\    bbox_transform=plt.gcf().transFigure)

For unknown reasons, bbox_transform=fig.transFigure does not work with me.


Viewing all articles
Browse latest Browse all 12

Trending Articles



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