From 63389a0844313428899cbdb3d7cda4042fd0adc1 Mon Sep 17 00:00:00 2001 From: mguetlein Date: Mon, 23 May 2011 10:59:34 +0200 Subject: fix for plot-zoom feature --- report/plot_factory.rb | 4 +++- report/report_content.rb | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'report') diff --git a/report/plot_factory.rb b/report/plot_factory.rb index 2a621f4..dfb1369 100644 --- a/report/plot_factory.rb +++ b/report/plot_factory.rb @@ -115,7 +115,9 @@ module Reports LOGGER.warn "could not create ROC plot for "+value.to_s end end - RubyPlot::plot_lines(out_file, "ROC-Plot", x_label, y_label, names, fp_rates, tp_rates ) + out_files.each do |out_file| + RubyPlot::plot_lines(out_file, "ROC-Plot", x_label, y_label, names, fp_rates, tp_rates ) + end else data = transform_roc_predictions(validation_set, class_value, show_single_curves) labels = [] diff --git a/report/report_content.rb b/report/report_content.rb index a8b700b..d60f700 100755 --- a/report/report_content.rb +++ b/report/report_content.rb @@ -151,7 +151,8 @@ class Reports::ReportContent @xml_report.add_imagefigure(section_regr, image_title, plot_png[:name], "PNG", 100, plot_svg[:name]) rescue Exception => ex LOGGER.error("Could not create regression plot: "+ex.message) - rm_tmp_file(plot_file_name) + rm_tmp_file(plot_png[:name]) + rm_tmp_file(plot_svg[:name]) @xml_report.add_paragraph(section_regr, "could not create regression plot: "+ex.message) end else @@ -184,8 +185,9 @@ class Reports::ReportContent @xml_report.add_imagefigure(section_roc, image_title, plot_png[:name], "PNG", 100, plot_svg[:name]) rescue Exception => ex msg = "WARNING could not create roc plot for class value '"+accept_value.to_s+"': "+ex.message - #LOGGER.error(msg) - rm_tmp_file(plot_file_name) + LOGGER.error(msg) + rm_tmp_file(plot_png[:name]) + rm_tmp_file(plot_svg[:name]) @xml_report.add_paragraph(section_roc, msg) end else @@ -220,7 +222,8 @@ class Reports::ReportContent rescue Exception => ex msg = "WARNING could not create confidence plot: "+ex.message LOGGER.error(msg) - rm_tmp_file(plot_file_name) + rm_tmp_file(plot_png[:name]) + rm_tmp_file(plot_svg[:name]) @xml_report.add_paragraph(section_conf, msg) end else -- cgit v1.2.3