diff --git a/doc/dynare.texi b/doc/dynare.texi index db2a6bc61acd8ac11d67184fcb89023561692a39..7690ae9585fab8a315aea64e86a3d344d9928dc8 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 7ceff4c01188ecce8d7a9986723c0270be1ee97b..cd1747d6ca700acb4802dffc23bab18285df8ef2 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 36398c7e4c4af96616e6137720789c373d3e34e5..bdb91a117866e88d54cf0539e5ec330bd1ce9eff 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 9512b115fee2d1bd57dee9ecbe7b4993ed297b1b..24b602ff0bca7f539c14a77aa54e7efa9e697cbb 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