Borrar filtros
Borrar filtros

Variable figure size in report generator

7 visualizaciones (últimos 30 días)
Tyler
Tyler el 4 de Abr. de 2014
Comentada: Jason Ellison el 26 de Mayo de 2016
In the figure snapshot component I'd like to set the paper and display sizes to be variables from the workspace rather than fixed sizes. When I center %<figSize> into the size field, though, data validation resets the value back to the fixed size it was before.
Is it possible to variable figure sizes like this?
  1 comentario
Jason Ellison
Jason Ellison el 26 de Mayo de 2016
If I understand right, you would like to change the size of your figure in the report with a variable.
If I understand your question correctly, you may be able to do it like this. Save the file, make an image object with the file, then change the height and width with a variable.
h = figure;
print(h,'imageFileName','-dpng');
imgObj = Image('imageFileName.png');
widthStr = '6in'; % this could be a variable set in the workspace
heightStr = '3in'; % this could be a variable set in the workspace
imgObj.Height = heightStr;
imgObj.Width = widthStr;
append(report,imgObj);

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB Report Generator en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by