Main Content

getSnapshotImage

クラス: mlreportgen.report.Figure
名前空間: mlreportgen.report

スナップショット イメージのパスの取得

構文

imgpath = getSnapshotImage(figReporter,report)

説明

imgpath = getSnapshotImage(figReporter,report) は、figReporter で指定された Figure ウィンドウのイメージを作成し、そのイメージを含むファイルへのパスを返します。このメソッドを使用して、レポート内の Figure のレイアウトをカスタマイズします。

入力引数

すべて展開する

Figure のレポーター オブジェクト。mlreportgen.report.Figure オブジェクトとして指定します。

レポート。レポート オブジェクトとして指定します。report 入力を作成するには、mlreportgen.report.Report を使用します。

出力引数

すべて展開する

Figure を含むファイルの Figure パス。string スカラーとして返されます。

スナップショット イメージのサイズの変更

import mlreportgen.report.*
import mlreportgen.dom.*

rpt = Report('peaks');
surf(peaks(20));
figure = Figure();
peaks20 = Image(getSnapshotImage(figure,rpt));
peaks20.Width = '3in';
peaks20.Height = [];
figure = peaks20;

delete(gcf);
add(rpt,figure)
close(rpt);
rptview(rpt);

バージョン履歴

R2017b で導入