From 17a2c4000dc82f7776edfb12eb0b96f7f9a82eb5 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Wed, 24 Apr 2013 17:59:45 +0200
Subject: [PATCH] reporting: @graph: avoid legend crash on octave

---
 matlab/reporting/@graph/createGraph.m | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/matlab/reporting/@graph/createGraph.m b/matlab/reporting/@graph/createGraph.m
index a511840774..8297a54cee 100644
--- a/matlab/reporting/@graph/createGraph.m
+++ b/matlab/reporting/@graph/createGraph.m
@@ -99,9 +99,9 @@ xticks = get(gca, 'XTick');
 set(gca, 'XTickLabel', xlabels(ix));
 
 if o.legend
-    lh = legend(line_handles, o.seriesElements.getTexNames());
-    set(lh, 'orientation', o.legend_orientation);
-    set(lh, 'Location', o.legend_location);
+    lh = legend(line_handles, o.seriesElements.getTexNames(), ...
+                'orientation', o.legend_orientation, ...
+                'location', o.legend_location);
     set(lh, 'FontSize', o.legend_font_size);
     set(lh, 'interpreter', 'latex');
     legend('boxoff');
-- 
GitLab