Hi!
I have a large series of plots that I need to output as png, emf and svg, and they have to be exactly 500x300 pixels. This has proven incredibly difficult to achieve. I know that I can specify the size of the graph builder using Size(), but that results in a plot that is significantly larger due to added axis titles, plot title, legends, margins and such.
To explain what I'm doing: I add an OnOpen script to my datatable which plots my data using the Graph builder, and create a report and use that to add axis titles and such. I have another script that opens the data table and extracts the picturebox from the generated report. This is then put into a VListBox together with plot titles and such. This box is then exported using SavePicture().
vlb = VListBox(
Align(center),
tb1 = TextBox(
"",
SetFontSize(numFONTSIZETITLE),
SetFontStyle(strFONTSTYLETITLE),
SetFont(strFONTITLE),
SetWrap(0.9*numLENGTHEXPORT)),
tb2 = TextBox(
"Title",
SetFontSize(numFONTSIZETITLE),
SetFontStyle(strFONTSTYLETITLE),
SetFont(strFONTITLE),
SetWrap(0.9*numLENGTHEXPORT)),
tb3 = TextBox(
strComments,
SetFontSize(numFONTSIZECOMMENTS),
SetFontStyle(strFONTSTYLECOMMENTS),
SetFont(strFONTCOMMENTS),
SetWrap(0.9*numLENGTHEXPORT)),
pb1 = reportgraphbuilder[PictureBox(1)]
);
vlb << Save Picture(drFolderSave || strPlotName || ".emf", emf);
vlb << Save Picture(drFolderSave || strPlotName || ".png", png);
vlb << Save Picture(drFolderSave || strPlotName || ".svg", svg);
I tried to change the size of the VListBox, but the VListBox insists that it has a size of {0,0}, which makes no sense since it contains a quite large picturebox. I tried to generate a FrameBox around it, but I only get error messages. I've looked for more documentation on that box, but I can only find documentation on the functions you can send to it, not how to generate one or when you should use it.