To provide the most recent news and documentation www.pymvpa.org reflects the
development 2.0 series (renamed 0.6 series) of PyMVPA. If you are interested in the
documentation of the previous stable 0.4 series of PyMVPA, please
visit v04.pymvpa.org.
class mvpa2.base.report.Report(name='report', title=None, path=None, author=None, style='Normal', fig_ext=None, font='Helvetica', pagesize=None)¶
Simple PDF reports using reportlab
Named report ‘report’ generates ‘report.pdf’ and directory ‘report/’ with
images which were requested to be included in the report
You can attach report to the existing ‘verbose’ with
>>> report=Report()>>> verbose.handlers+=[report]
and then all verbose messages present on the screen will also be recorded
in the report. Use
>>> report.text("string")# to add arbitrary text>>> report.xml("<H1>skajdsf</H1>")# to add XML snippet
or
>>> report.figure()# to add the current figure to the report.>>> report.figures()# to add existing figures to the report
Note that in the later usecase, figures might not be properly
interleaved with verbose messages if there were any between the
creations of the figures.
Inspired by Andy Connolly
Initialize report
Parameters :
name : string
Name of the report
title : string or None
Title to start the report, if None, name will be used
path : string
Top directory where named report will be stored. Has to be
set now to have correct path for storing image renderings.
Default: current directory
author : string or None
Optional author identity to be printed
style : string
Default Paragraph to be used. Must be the one of the known
to reportlab styles, e.g. Normal
fig_ext : string
What extension to use for figures by default. If None, a default
will be used. Since versions prior 2.2 of reportlab might do not
support pdf, ‘png’ is default for those, ‘pdf’ otherwise
Figure to place into report: str is treated as a filename,
Figure stores it into a file under directory and embeds
into the report, and None takes the current figure
savefig_kwargs : dict
Additional keyword arguments to provide savefig with (e.g. dpi)