summaryrefslogtreecommitdiff
path: root/report/plot_factory.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-05-12 13:09:17 +0200
committermguetlein <martin.guetlein@gmail.com>2011-05-12 13:09:17 +0200
commitac97115f25ca0e8ecc3ffb6baed3739353cadb6f (patch)
treeb7dbb98a791db2685943e5d3d9999192ca131989 /report/plot_factory.rb
parentc858faa20607125097a3ca36f9178c4b4076b071 (diff)
rescue non-runtime error when plotting, more sensible error msg when no predictions for regression plot
Diffstat (limited to 'report/plot_factory.rb')
-rw-r--r--report/plot_factory.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/report/plot_factory.rb b/report/plot_factory.rb
index deb1880..5fd20bb 100644
--- a/report/plot_factory.rb
+++ b/report/plot_factory.rb
@@ -77,7 +77,8 @@ module Reports
x << x_i
y << y_i
end
-
+
+ raise "no predictions performed" if x.size==0 || x[0].size==0
RubyPlot::plot_points(out_file, "Regression plot", "Predicted values", "Actual values", names, x, y )
end