reporting: add custom height/width to graphs
parent
adda7d8604
commit
617db5ba64
|
@ -64,6 +64,9 @@ o.graphSize = [];
|
||||||
o.xTicks = [];
|
o.xTicks = [];
|
||||||
o.xTickLabels = {};
|
o.xTickLabels = {};
|
||||||
|
|
||||||
|
o.width = 6;
|
||||||
|
o.height = 4.5;
|
||||||
|
|
||||||
if nargin == 1
|
if nargin == 1
|
||||||
assert(isa(varargin{1}, 'graph'),['@graph.graph: with one arg you ' ...
|
assert(isa(varargin{1}, 'graph'),['@graph.graph: with one arg you ' ...
|
||||||
'must pass a graph object']);
|
'must pass a graph object']);
|
||||||
|
@ -104,6 +107,9 @@ assert(ischar(o.shadeColor), '@graph.graph: shadeColor must be a string');
|
||||||
assert(isfloat(o.shadeOpacity) && length(o.shadeOpacity)==1 && ...
|
assert(isfloat(o.shadeOpacity) && length(o.shadeOpacity)==1 && ...
|
||||||
o.shadeOpacity >= 0 && o.shadeOpacity <= 1, ...
|
o.shadeOpacity >= 0 && o.shadeOpacity <= 1, ...
|
||||||
'@graph.graph: o.shadeOpacity must be a real in [0 1]');
|
'@graph.graph: o.shadeOpacity must be a real in [0 1]');
|
||||||
|
assert(isfloat(o.width), '@graph.graph: o.width must be a real number');
|
||||||
|
assert(isfloat(o.height), '@graph.height: o.width must be a real number');
|
||||||
|
|
||||||
valid_legend_locations = ...
|
valid_legend_locations = ...
|
||||||
{'North', 'South', 'East', 'West', ...
|
{'North', 'South', 'East', 'West', ...
|
||||||
'NorthEast', 'SouthEast', 'NorthWest', 'SouthWest', ...
|
'NorthEast', 'SouthEast', 'NorthWest', 'SouthWest', ...
|
||||||
|
|
|
@ -87,13 +87,13 @@ for i = 1:length(x)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
fprintf(fid, '},\nx tick label style={rotate=45,anchor=east},\n');
|
fprintf(fid, '},\nx tick label style={rotate=45,anchor=east},\n');
|
||||||
fprintf(fid, ['width=6.0in,\n'...
|
fprintf(fid, ['width=%fin,\n'...
|
||||||
'height=4.5in,\n'...
|
'height=%fin,\n'...
|
||||||
'scale only axis,\n'...
|
'scale only axis,\n'...
|
||||||
'xmin=1,\n'...
|
'xmin=1,\n'...
|
||||||
'xmax=%d,\n'...
|
'xmax=%d,\n'...
|
||||||
'ymin=%d,\n'...
|
'ymin=%d,\n'...
|
||||||
'ymax=%d,\n'], dd.ndat, ymin, ymax);
|
'ymax=%d,\n'], o.width, o.height, dd.ndat, ymin, ymax);
|
||||||
|
|
||||||
if o.showGrid
|
if o.showGrid
|
||||||
fprintf(fid, 'xmajorgrids=true,\nymajorgrids=true,\n');
|
fprintf(fid, 'xmajorgrids=true,\nymajorgrids=true,\n');
|
||||||
|
|
Loading…
Reference in New Issue