<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Output picture size in pixels in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Output-picture-size-in-pixels/m-p/255656#M50202</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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().&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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 &amp;lt;&amp;lt; Save Picture(drFolderSave || strPlotName || ".emf", emf);
vlb &amp;lt;&amp;lt; Save Picture(drFolderSave || strPlotName || ".png", png);
vlb &amp;lt;&amp;lt; Save Picture(drFolderSave || strPlotName || ".svg", svg);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;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.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 23:26:49 GMT</pubDate>
    <dc:creator>Ingerid</dc:creator>
    <dc:date>2023-06-09T23:26:49Z</dc:date>
    <item>
      <title>Output picture size in pixels</title>
      <link>https://community.jmp.com/t5/Discussions/Output-picture-size-in-pixels/m-p/255656#M50202</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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().&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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 &amp;lt;&amp;lt; Save Picture(drFolderSave || strPlotName || ".emf", emf);
vlb &amp;lt;&amp;lt; Save Picture(drFolderSave || strPlotName || ".png", png);
vlb &amp;lt;&amp;lt; Save Picture(drFolderSave || strPlotName || ".svg", svg);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:26:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Output-picture-size-in-pixels/m-p/255656#M50202</guid>
      <dc:creator>Ingerid</dc:creator>
      <dc:date>2023-06-09T23:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Output picture size in pixels</title>
      <link>https://community.jmp.com/t5/Discussions/Output-picture-size-in-pixels/m-p/255737#M50233</link>
      <description>Hi,&lt;BR /&gt;Have you tried to first capture the plots as an image (MyPict = vlb &amp;lt;&amp;lt; Get Picture ()) and then use the MyPict &amp;lt;&amp;lt; Set Size ({500, 300})?</description>
      <pubDate>Thu, 02 Apr 2020 19:05:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Output-picture-size-in-pixels/m-p/255737#M50233</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2020-04-02T19:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Output picture size in pixels</title>
      <link>https://community.jmp.com/t5/Discussions/Output-picture-size-in-pixels/m-p/255867#M50254</link>
      <description>Wow, that worked! Thank you so much!</description>
      <pubDate>Fri, 03 Apr 2020 08:36:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Output-picture-size-in-pixels/m-p/255867#M50254</guid>
      <dc:creator>Ingerid</dc:creator>
      <dc:date>2020-04-03T08:36:34Z</dc:date>
    </item>
  </channel>
</rss>

