From fee1f9442f1cf2c5de26bf03dec1c0c7027fd023 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Wed, 19 Feb 2014 15:23:56 +0100
Subject: [PATCH] reporting: change figName option to graphName; change
 figDirName option to graphDirName

---
 doc/dynare.texi                        | 12 ++++++------
 matlab/reports/@graph/graph.m          | 12 ++++++------
 matlab/reports/@graph/write.m          |  2 +-
 matlab/reports/@graph/writeGraphFile.m |  8 ++++----
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/doc/dynare.texi b/doc/dynare.texi
index db2a6bc61a..7690ae9585 100644
--- a/doc/dynare.texi
+++ b/doc/dynare.texi
@@ -10784,7 +10784,7 @@ command. Default: @code{`!'}
 @end table
 @end defmethod
 
-@defmethod Report addGraph data, figName, figDirName, graphSize, height, showGrid, showLegend, showLegendBox, legendLocation, legendOrientation, legendFontSize, seriesToUse, shade, shadeColor, shadeOpacity, title, width, xlabel, ylabel, xAxisTight, xrange, xTicks, xTickLabels, xTickLabelAnchor, xTickLabelRotation, yAxisTight, yrange, showZeroline
+@defmethod Report addGraph data, graphDirName, graphName, graphSize, height, showGrid, showLegend, showLegendBox, legendLocation, legendOrientation, legendFontSize, seriesToUse, shade, shadeColor, shadeOpacity, title, width, xlabel, ylabel, xAxisTight, xrange, xTicks, xTickLabels, xTickLabelAnchor, xTickLabelRotation, yAxisTight, yrange, showZeroline
 Adds a @code{Graph} to a @code{Section}.
 @optionshead
 @table @code
@@ -10793,14 +10793,14 @@ Adds a @code{Graph} to a @code{Section}.
 The @code{dseries} that provides the data for the graph. Default:
 @code{none}
 
-@item figName, @code{STRING}
-The name to use when saving this figure. Default: something of the
-form @code{graph_pg1_sec2_row1_col3.tex}
-
-@item figDirName, @code{STRING}
+@item graphDirName, @code{STRING}
 The name of the folder in which to store this figure. Default:
 @code{tmpRepDir}
 
+@item graphName, @code{STRING}
+The name to use when saving this figure. Default: something of the
+form @code{graph_pg1_sec2_row1_col3.tex}
+
 @item graphSize, @code{NUMERICAL_VECTOR}
 The width and height to be passed to the third and fourth elements of
 the array passed to the @code{`Position'} option of Matlab's
diff --git a/matlab/reports/@graph/graph.m b/matlab/reports/@graph/graph.m
index 7ceff4c011..cd1747d6ca 100644
--- a/matlab/reports/@graph/graph.m
+++ b/matlab/reports/@graph/graph.m
@@ -40,8 +40,8 @@ o.titleFormat = '';
 o.ylabel = '';
 o.xlabel = '';
 
-o.figDirName = 'tmpRepDir';
-o.figName = '';
+o.graphDirName = 'tmpRepDir';
+o.graphName = '';
 o.data = '';
 o.seriesToUse = '';
 o.xrange = '';
@@ -105,8 +105,8 @@ assert(iscellstr(o.title), '@graph.graph: title must be a cell array of string(s
 assert(ischar(o.titleFormat), '@graph.graph: titleFormat file must be a string');
 assert(ischar(o.xlabel), '@graph.graph: xlabel file must be a string');
 assert(ischar(o.ylabel), '@graph.graph: ylabel file must be a string');
-assert(ischar(o.figName), '@graph.graph: figName must be a string');
-assert(ischar(o.figDirName), '@graph.graph: figDirName must be a string');
+assert(ischar(o.graphName), '@graph.graph: graphName must be a string');
+assert(ischar(o.graphDirName), '@graph.graph: graphDirName must be a string');
 assert(islogical(o.showGrid), '@graph.graph: showGrid must be either true or false');
 assert(islogical(o.xAxisTight), '@graph.graph: xAxisTight must be either true or false');
 assert(islogical(o.yAxisTight), '@graph.graph: yAxisTight must be either true or false');
@@ -185,8 +185,8 @@ end
 o = rmfield(o, 'seriesToUse');
 o = rmfield(o, 'data');
 
-if ~exist(o.figDirName, 'file')
-    mkdir(o.figDirName);
+if ~exist(o.graphDirName, 'file')
+    mkdir(o.graphDirName);
 end
 
 % Create graph object
diff --git a/matlab/reports/@graph/write.m b/matlab/reports/@graph/write.m
index 36398c7e4c..bdb91a1178 100644
--- a/matlab/reports/@graph/write.m
+++ b/matlab/reports/@graph/write.m
@@ -35,5 +35,5 @@ function o = write(o, fid, pg, sec, row, col)
 
 assert(fid ~= -1);
 o = writeGraphFile(o, pg, sec, row, col);
-fprintf(fid, '\\input{%s}', o.figName);
+fprintf(fid, '\\input{%s}', o.graphName);
 end
\ No newline at end of file
diff --git a/matlab/reports/@graph/writeGraphFile.m b/matlab/reports/@graph/writeGraphFile.m
index 9512b115fe..24b602ff0b 100644
--- a/matlab/reports/@graph/writeGraphFile.m
+++ b/matlab/reports/@graph/writeGraphFile.m
@@ -38,13 +38,13 @@ if ne < 1
     return;
 end
 
-if isempty(o.figName)
-    o.figName = sprintf('%s/graph_pg%d_sec%d_row%d_col%d.tex', o.figDirName, pg, sec, row, col);
+if isempty(o.graphName)
+    o.graphName = sprintf('%s/graph_pg%d_sec%d_row%d_col%d.tex', o.graphDirName, pg, sec, row, col);
 else
-    o.figName = [o.figDirName '/' o.figName];
+    o.graphName = [o.graphDirName '/' o.graphName];
 end
 
-[fid, msg] = fopen(o.figName, 'w');
+[fid, msg] = fopen(o.graphName, 'w');
 if fid == -1
     error(['@graph.writeGraphFile: ' msg]);
 end
-- 
GitLab