diff --git a/bin/barplot_fine.py b/bin/barplot_fine.py
index c3d5b55582b77acf1e519a36b0d58a13a413fdf6..c9c008ddc2cc76a9530373cba78fe8abb7f88d6f 100644
--- a/bin/barplot_fine.py
+++ b/bin/barplot_fine.py
@@ -54,8 +54,8 @@ r2 = ax.bar(deg, y2, width, color="orange")
 r1 = ax.bar(deg, y1, width, color="red")
 
 ax.set_ylabel("Percentage")
-ax.set_xticks(sorted(av['degree']))
-ax.set_xticklabels(["Q{}".format(k) for k in sorted(av['degree'])])
+ax.set_xticks(sorted(av1['degree']))
+ax.set_xticklabels(["Q{}".format(k) for k in sorted(av1['degree'])])
 
 timeframe = pandas.read_csv("./timeratios.csv",
                             header=None,
@@ -90,13 +90,16 @@ r3 = ax.bar(deg, y3, width, label="Volume, backward SF", color="yellow")
 r2 = ax.bar(deg, y2, width, label="Volume, Quadrature", color="orange") 
 r1 = ax.bar(deg, y1, width, label="Volume, forward SF", color="red")
 
-ax.legend(loc=3,
-          ncol=2,
-          bbox_to_anchor=(0.05, 1., 1., .1),
-          )
+lgd = ax.legend(loc=3,
+                ncol=2,
+                bbox_to_anchor=(0.05, 1., 1., .1),
+                )
 
-for x in av['degree']:
-    ax.text(x, -0.09, "Flops", rotation=45, horizontalalignment="right")
-    ax.text(x + 0.6, -0.09, "Time", rotation=45, horizontalalignment="right")
+texts = []
+for x in av1['degree']:
+    texts.append(ax.text(x, -0.09, "Flops", rotation=45, horizontalalignment="right"))
+    texts.append(ax.text(x + 0.6, -0.09, "Time", rotation=45, horizontalalignment="right"))
 
-plt.savefig(filename)
+plt.savefig(filename,
+            bbox_extra_artists=tuple(texts) + (lgd,),
+            bbox_inches='tight')