From 150e265cd2fedc4ceb3f8f16e013a323911f1e9a Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Tue, 4 Feb 2014 17:01:29 +0100 Subject: [PATCH] reporting: check passed values --- matlab/reports/@graph/graph.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/matlab/reports/@graph/graph.m b/matlab/reports/@graph/graph.m index fbfedda23..0410203c6 100644 --- a/matlab/reports/@graph/graph.m +++ b/matlab/reports/@graph/graph.m @@ -140,6 +140,13 @@ 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'); +if ~isempty(o.xTickLabels) + assert(~isempty(o.xTicks), '@graph.graph: if you set xTickLabels, you must set xTicks'); +end +if ~isempty(o.xTicks) + assert(~isempty(o.xTickLabels), '@graph.graph: if you set xTicks, you must set xTickLabels'); +end + % using o.seriesToUse, create series objects and put them in o.seriesElements if ~isempty(o.data) if isempty(o.seriesToUse) -- GitLab