From a59697352a17dbb2f946dbcc7b925062fdf031b5 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Thu, 1 Sep 2016 13:57:24 +0200
Subject: [PATCH] Add xlim to rplot.m

Prevents excessive white space
---
 matlab/rplot.m | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/matlab/rplot.m b/matlab/rplot.m
index fe738c66a8..5705abdc1b 100644
--- a/matlab/rplot.m
+++ b/matlab/rplot.m
@@ -85,6 +85,7 @@ if rplottype == 0
     plot(ix(i),y(:,i)) ;
     title (t,'Interpreter','none') ;
     xlabel('Periods') ;
+    xlim([min(ix(i)) max(ix(i))])
     if size(s1,1) > 1
         if isoctave
             legend(s1);
@@ -101,6 +102,7 @@ elseif rplottype == 1
     for j = 1:size(y,1)
         hh=dyn_figure(options_,'Name',['Simulated Trajectory']);
         plot(ix(i),y(j,i)) ;
+        xlim([min(ix(i)) max(ix(i))])
         title(['Plot of ' s1(j,:)],'Interpreter','none') ;
         xlabel('Periods') ;
         dyn_saveas(hh,[M_.fname, filesep, 'graphs', filesep, 'SimulatedTrajectory_' deblank(s1(j,:))],options_)
-- 
GitLab