Commit d88a4c23 authored by Mario Hock's avatar Mario Hock

Legend: Absolute offset also in area plots (CPU)

parent 672befef
......@@ -2,6 +2,7 @@
from collections import defaultdict
from operator import itemgetter
from matplotlib import transforms
import numpy
import copy
......@@ -108,7 +109,10 @@ def plot_area_chart(ax, cnl_file, cols, legend_outside=True, legend_title=None):
# Legend
if ( legend_outside ):
l = ax.legend(bbox_to_anchor=(1.2, 1.02),fancybox=True, shadow=True, title=legend_title)
offset = transforms.ScaledTranslation(20, 0, transforms.IdentityTransform())
trans = ax.transAxes + offset
l = ax.legend(loc='upper left', bbox_to_anchor=(1.0, 1.02),fancybox=True, shadow=True, title=legend_title)
else:
l = ax.legend(loc=0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment