From e50ff6878c5ffec7642bc15bc8a43494a7c0e065 Mon Sep 17 00:00:00 2001 From: mehtank Date: Wed, 14 Sep 2016 13:11:53 -0700 Subject: [PATCH] Slightly better location for legend, but overlaps above plot sometimes --- python/plots.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/plots.py b/python/plots.py index 3b63eb2..b46ad98 100644 --- a/python/plots.py +++ b/python/plots.py @@ -87,7 +87,8 @@ def pcolor_multi(title, (xrng, xlabel), axarr[-1].plot(yrng, ts, label="lane %s" % sid) axarr[-1].set_ylabel("Average loop speed (m/s)") - axarr[-1].legend() + axarr[-1].legend(bbox_to_anchor=(0., 1.02, 1., .051), loc=3, + ncol=numlanes, mode="expand", borderaxespad=0.) axarr[-1].set_xlabel(ylabel) fig.text(0.5, 0.975, title, horizontalalignment='center', verticalalignment='top')