From 2cb40a658d6ced1334083092251d90a3454b694d Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Thu, 18 Apr 2013 17:19:48 +0200
Subject: [PATCH] reporting: @graph: set prettier spacing of xticklabels

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

diff --git a/matlab/reporting/@graph/createGraph.m b/matlab/reporting/@graph/createGraph.m
index e40eaddead..919bde1578 100644
--- a/matlab/reporting/@graph/createGraph.m
+++ b/matlab/reporting/@graph/createGraph.m
@@ -94,8 +94,9 @@ if ~isempty(o.shade)
     set(gca(), 'children', children);
 end
 
-set(gca,'XTick', x);
-set(gca,'XTickLabel', xlabels);
+xticks = get(gca, 'XTick');
+[junk, ix, junk] = intersect(x, xticks);
+set(gca, 'XTickLabel', xlabels(ix));
 
 if o.legend
     lh = legend(line_handles, o.seriesElements.getTexNames());
-- 
GitLab