MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES Guide de l'utilisateur Page 928

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 986
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 927
13 Create a Report Program
13-76
Create and Format Images
In this section...
“Create an Image” on page 13-76
“Resize an Image” on page 13-77
“Image Storage” on page 13-77
“Links from an Image” on page 13-77
Create an Image
To create an image to a report, create an mlreportgen.dom.Image object. You can
append it to one of these document element objects:
Document
Group
Paragraph
ListItem
TableEntry
For example, you can create a MATLAB figure, save it as an image, and add the image to
a report.
import mlreportgen.dom.*
d = Document('imageArea','html');
p = Paragraph('Plot 1');
p.Bold = true;
append(d,p);
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y);
saveas(gcf,'myPlot_img.png');
plot1 = Image('myPlot_img.png');
append(d,plot1);
Vue de la page 927
1 2 ... 923 924 925 926 927 928 929 930 931 932 933 ... 985 986

Commentaires sur ces manuels

Pas de commentaire