summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-05-26 14:15:54 +0200
committermguetlein <martin.guetlein@gmail.com>2011-05-26 14:15:54 +0200
commit0d765f29d4d98cb085d8c067acf4d2249b541c6e (patch)
treea2c5dbdb0df8ca5df0257c77377ed4b2ec97aec6
parent4024dd30788865f019b2d2d2ed705a4945e8c52e (diff)
fixes in reports for crossvaldiation with few predictions
-rwxr-xr-xreport/report_content.rb6
-rwxr-xr-xreport/xml_report.rb16
2 files changed, 11 insertions, 11 deletions
diff --git a/report/report_content.rb b/report/report_content.rb
index a554881..d45d736 100755
--- a/report/report_content.rb
+++ b/report/report_content.rb
@@ -164,8 +164,7 @@ class Reports::ReportContent
accept_value,
split_set_attribute=nil,
image_title = "ROC Plot",
- section_text=nil,
- image_caption=nil)
+ section_text="")
#section_roc = @xml_report.add_section(@current_section, section_title)
section_roc = @current_section
@@ -282,8 +281,7 @@ class Reports::ReportContent
value_attributes,
section_title="Bar Plot",
section_text=nil,
- image_title="Bar Plot",
- image_caption=nil)
+ image_title="Bar Plot")
section_bar = @xml_report.add_section(@current_section, section_title)
@xml_report.add_paragraph(section_bar, section_text) if section_text
diff --git a/report/xml_report.rb b/report/xml_report.rb
index c2dd300..ab3098e 100755
--- a/report/xml_report.rb
+++ b/report/xml_report.rb
@@ -133,16 +133,18 @@ module Reports
return figure
end
- # bit of a hack to algin the last two elements that have been added to element into one row
- def align_last_two_elements( element, title )
+ # bit of a hack to algin the last two figures that have been added to element into one row
+ def align_last_two_figures( element, title )
imgs = []
- element.elements.each do |e|
+ element.elements.each do |e|
imgs[0] = imgs[1]
- imgs[1] = e
+ imgs[1] = e if e.name=="figure"
+ end
+ if (imgs[0] and imgs[1])
+ element.delete_element imgs[0]
+ element.delete_element imgs[1]
+ add_imagefigures_in_row( element, imgs, title )
end
- element.delete_element imgs[0]
- element.delete_element imgs[1]
- add_imagefigures_in_row( element, imgs, title )
end
def add_imagefigures_in_row( element, imagefigures, title )