reporting: fix figure inclusion for windows
parent
da83298e46
commit
7fa3ab3999
|
@ -135,12 +135,11 @@ end
|
|||
drawnow;
|
||||
|
||||
if isempty(o.figname)
|
||||
tn = tempname;
|
||||
[junk, tn] = fileparts(tempname);
|
||||
if strcmp(computer, 'PCWIN') || strcmp(computer, 'PCWIN64')
|
||||
tn = strrep(tn, '\', '/');
|
||||
tn = strrep(tn, '_', '\_');
|
||||
end
|
||||
o.figname = [tn '.tex'];
|
||||
o.figname = [o.figDirName filesep tn '.tex'];
|
||||
end
|
||||
disp(' converting to tex....');
|
||||
if isoctave && isempty(regexpi(computer, '.*apple.*', 'once'))
|
||||
|
|
|
@ -39,6 +39,7 @@ o.title = '';
|
|||
o.ylabel = '';
|
||||
o.xlabel = '';
|
||||
|
||||
o.figDirName = 'tmpFigDir';
|
||||
o.figname = '';
|
||||
o.data = '';
|
||||
o.seriesToUse = '';
|
||||
|
@ -92,6 +93,7 @@ assert(ischar(o.title), '@graph.graph: title 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(islogical(o.showGrid), '@graph.graph: showGrid must be either true or false');
|
||||
assert(islogical(o.showLegend), '@graph.graph: showLegend must be either true or false');
|
||||
assert(islogical(o.showLegendBox), '@graph.graph: showLegendBox must be either true or false');
|
||||
|
@ -150,6 +152,10 @@ end
|
|||
o = rmfield(o, 'seriesToUse');
|
||||
o = rmfield(o, 'data');
|
||||
|
||||
if ~exist(o.figDirName, 'file')
|
||||
mkdir(o.figDirName);
|
||||
end
|
||||
|
||||
% Create graph object
|
||||
o = class(o, 'graph');
|
||||
end
|
Loading…
Reference in New Issue