Main Content

getImageReporter

Class: mlreportgen.report.TitlePage
Namespace: mlreportgen.report

Get title page image reporter

Syntax

reporter = getImageReporter(tp)

Description

reporter = getImageReporter(tp) returns a reporter that the TitlePage reporter (tp) uses to format the image specified by the Image property. You use getImageReporter to customize the image position and alignment.

Input Arguments

expand all

Title page of the report, specified as a title page reporter object. To create the tp input, you use mlreportgen.report.TitlePage.

Output Arguments

expand all

Title page image reporter, returned as a reporter object.

Examples

expand all

To customize the style for the image myImage.jpg on the title page of a report, use a custom TitlePage template.

Create a template file named MyTitlePageTemplate and customize the TitlePageImage style for the template.

Use getImageReporter and the TemplateSrc property to use your template.

import mlreportgen.report.*
rpt = Report();
tp = TitlePage();
tp.Image = "myImage.jpg";
tp.Image = getImageReporter(tp);
tp.Image.TemplateSrc = "MyTitlePageTemplate";
add(rpt,tp);

Version History

Introduced in R2017b