Hello,
getSnapshotImage seems to be adding an extra space in the annotation of my figures. In the dummy plot below there is no space between the R and the 2 in superscript in the annotation. But when I open the report there is an added space between the R and the 2 in superscript in the annotation. How do I get rid of that added space ?
import mlreportgen.report.*
rpt = Report('test', 'pdf');
plot([1,2,3,4], [1,2,3,4])
str = ['N = ', num2str(N), ', R^2 = ', sprintf('%.2f', R)];
annotation('textbox', [.15 0.85 0 0], 'string', str, 'FitBoxToText', 'on', 'EdgeColor', 'black');
img = Image(getSnapshotImage(figure, rpt));
halign = mlreportgen.dom.HAlign('center');
img.Style = [img.Style(:)' {halign}];