reporting: add xTicks argument
parent
832f8ee82f
commit
6f8d7fd0ec
|
@ -10352,7 +10352,7 @@ command. Default: @code{`!'}
|
|||
@end table
|
||||
@end defmethod
|
||||
|
||||
@defmethod Report addGraph data, figname, figDirName, graphSize, showGrid, showLegend, showLegendBox, legendLocation, legendOrientation, legendFontSize, seriesToUse, shade, shadeColor, shadeOpacity, title, xlabel, ylabel, xrange, xTickLabels, yrange, showZeroline
|
||||
@defmethod Report addGraph data, figname, figDirName, graphSize, showGrid, showLegend, showLegendBox, legendLocation, legendOrientation, legendFontSize, seriesToUse, shade, shadeColor, shadeOpacity, title, xlabel, ylabel, xrange, xTicks, xTickLabels, yrange, showZeroline
|
||||
Adds a @code{Graph} to a @code{Section}.
|
||||
@optionshead
|
||||
@table @code
|
||||
|
@ -10425,9 +10425,16 @@ The y-axis label. Default: @code{none}
|
|||
@item xrange, @code{dates}
|
||||
The boundary on the x-axis to display in the graph. Default: all
|
||||
|
||||
@anchor{xTicks}
|
||||
@item xTicks, @code{NUMERICAL_VECTOR}
|
||||
Used only in conjunction with @ref{xTickLabels}, this option denotes
|
||||
the numerical position of the label along the x-axis. The positions
|
||||
begin at @math{1}. Default: set by Matlab/Octave.
|
||||
|
||||
@anchor{xTickLabels}
|
||||
@item xTickLabels, @code{CELL_ARRAY_STRINGS}
|
||||
The labels to use for the xticks in the graph. Default: the dates of
|
||||
the @code{dseries}
|
||||
The labels to be mapped to the ticks provided by
|
||||
@ref{xTicks}. Default: the dates of the @code{dseries}
|
||||
|
||||
@item yrange, @code{NUMERICAL_VECTOR}
|
||||
The boundary on the y-axis to display in the graph, represented as a
|
||||
|
|
|
@ -110,6 +110,7 @@ if isempty(o.xTickLabels)
|
|||
end
|
||||
end
|
||||
else
|
||||
set(gca, 'XTick', o.xTicks);
|
||||
xTickLabels = o.xTickLabels;
|
||||
end
|
||||
set(gca, 'XTickLabel', xTickLabels);
|
||||
|
|
|
@ -61,6 +61,7 @@ o.legendFontSize = 8;
|
|||
o.showZeroline = false;
|
||||
|
||||
o.graphSize = [];
|
||||
o.xTicks = [];
|
||||
o.xTickLabels = {};
|
||||
|
||||
if nargin == 1
|
||||
|
@ -135,6 +136,8 @@ assert(isempty(o.seriesToUse) || iscellstr(o.seriesToUse), ['@graph.graph: ' ...
|
|||
assert(isempty(o.graphSize) || ((isfloat(o.graphSize) && length(o.graphSize) == 2)),...
|
||||
['@graph.graph: graphSize is specified as an array with two float ' ...
|
||||
'entries, [width height]']);
|
||||
assert(isempty(o.xTicks) || isfloat(o.xTicks),...
|
||||
'@graph.graph: xTicks must be a numerical array');
|
||||
assert(iscellstr(o.xTickLabels), ...
|
||||
'@graph.graph: xTickLabels must be a cell array of strings');
|
||||
% using o.seriesToUse, create series objects and put them in o.seriesElements
|
||||
|
|
Loading…
Reference in New Issue