<?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 Re: How do I export a chart WITHOUT the chart header? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-export-a-chart-WITHOUT-the-chart-header/m-p/612730#M81291</link>
    <description>&lt;P&gt;Short Answer:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;obj&amp;lt;&amp;lt;Dispatch( {}, "", GraphBuilderContainerBox, {save picture("test.png",png)} );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Long answer:&lt;/P&gt;
&lt;P&gt;So, JMP does this super annoying thing where if you save the script for something, but part of the thing is selected, the saved script also catches that and you have to re-run the report script then select nothing and then save the script.&lt;/P&gt;
&lt;P&gt;It's really annoying, except when I'm trying to find out how to reference some part of a report or graph. &amp;nbsp;In that case the script for the object includes a "Dispatch(some long string)", &amp;nbsp;and this is super useful!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made a control chart, used the selection tool to select the part I wanted, then saved the script.&lt;/P&gt;
&lt;P&gt;I edited the script like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;obj=Control Chart Builder(...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That "obj" is just an arbitrary variable name, but it lets me send messages to "obj" which is the control chart object.&lt;/P&gt;
&lt;P&gt;In the script one thing was selected:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	SendToReport(
		Dispatch( {}, "", GraphBuilderContainerBox, {select} ),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tried swapping out things in the curly brackets and discovered that "save picture" worked. Then it was just a matter of formatting the argument correctly and there we go.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2023 17:56:57 GMT</pubDate>
    <dc:creator>Byron_JMP</dc:creator>
    <dc:date>2023-03-15T17:56:57Z</dc:date>
    <item>
      <title>How do I export a chart WITHOUT the chart header?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-export-a-chart-WITHOUT-the-chart-header/m-p/612655#M81276</link>
      <description>&lt;P&gt;Hello, I'm writing a script to generate several charts and export them to a specified folder, but I'm unable to save them in the format that I desire.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a control chart&amp;nbsp;that I want to export to a directory specified by the user. Ideally, I would like the chart to save with no chart header, i.e., just the graphic with no text, like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMMunization_0-1678895828390.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51117iF9CF2979D759A027/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IMMunization_0-1678895828390.png" alt="IMMunization_0-1678895828390.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the following line of code to save the chart to a directory:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(resultsChart &amp;lt;&amp;lt; Child) &amp;lt;&amp;lt; Save Picture ("C:\Folder\results.jpg", JPEG );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, this code saves the chart with a header and footer, which I don't want:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMMunization_1-1678896499955.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51118i5995B77222E89A5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IMMunization_1-1678896499955.jpeg" alt="IMMunization_1-1678896499955.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What else I've tried:&lt;/P&gt;&lt;P&gt;Adding another&amp;nbsp;&lt;EM&gt;&amp;lt;&amp;lt; Child&lt;/EM&gt; argument to the script does not change the output.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;((resultsChart &amp;lt;&amp;lt; Child) &amp;lt;&amp;lt; Child) &amp;lt;&amp;lt; Save Picture ("C:\Folder\results.jpg", JPEG );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Saving the chart as HTML almost gives me the results I want, but not quite.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(resultsChart &amp;lt;&amp;lt; Child) &amp;lt;&amp;lt; Save HTML ("C:\Folder\results.html" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This line of code will create a folder in the specified directory called gfx. This folder contains all the charts I need in the format I want, with no headers or footers, but I don't like this solution for several reasons:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The script saves a bunch of extra files that I don't need (i.e., the HTML files themselves)&lt;/LI&gt;&lt;LI&gt;I don't want to create a new subfolder in the directory I'm trying to save to. I'd rather be able to export my charts directly where I want them to go.&lt;/LI&gt;&lt;LI&gt;I want to be able to name my files when I export them, but the file names in&amp;nbsp;&lt;EM&gt;gfx&lt;/EM&gt; seem to be hard-coded.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance is appreciated. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 14:40:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-export-a-chart-WITHOUT-the-chart-header/m-p/612655#M81276</guid>
      <dc:creator>IMMunization</dc:creator>
      <dc:date>2023-06-08T14:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I export a chart WITHOUT the chart header?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-export-a-chart-WITHOUT-the-chart-header/m-p/612730#M81291</link>
      <description>&lt;P&gt;Short Answer:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;obj&amp;lt;&amp;lt;Dispatch( {}, "", GraphBuilderContainerBox, {save picture("test.png",png)} );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Long answer:&lt;/P&gt;
&lt;P&gt;So, JMP does this super annoying thing where if you save the script for something, but part of the thing is selected, the saved script also catches that and you have to re-run the report script then select nothing and then save the script.&lt;/P&gt;
&lt;P&gt;It's really annoying, except when I'm trying to find out how to reference some part of a report or graph. &amp;nbsp;In that case the script for the object includes a "Dispatch(some long string)", &amp;nbsp;and this is super useful!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made a control chart, used the selection tool to select the part I wanted, then saved the script.&lt;/P&gt;
&lt;P&gt;I edited the script like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;obj=Control Chart Builder(...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That "obj" is just an arbitrary variable name, but it lets me send messages to "obj" which is the control chart object.&lt;/P&gt;
&lt;P&gt;In the script one thing was selected:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	SendToReport(
		Dispatch( {}, "", GraphBuilderContainerBox, {select} ),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tried swapping out things in the curly brackets and discovered that "save picture" worked. Then it was just a matter of formatting the argument correctly and there we go.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 17:56:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-export-a-chart-WITHOUT-the-chart-header/m-p/612730#M81291</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2023-03-15T17:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I export a chart WITHOUT the chart header?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-export-a-chart-WITHOUT-the-chart-header/m-p/612738#M81293</link>
      <description>&lt;P&gt;I usually use Show Properties to find which object to target&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Quality Control/Shirts.jmp");
obj = dt &amp;lt;&amp;lt; Control Chart(
	Sample Label(:Box),
	Sample Size(:Box Size),
	KSigma(3),
	Chart Col(:"# Defects"n),
	Chart Type(C)
);

Report(obj)["C of # Defects",BorderBox(1)] &amp;lt;&amp;lt; Save Picture("C:\temp\testimg.png", png);
Open("C:\temp\testimg.png");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1678903264762.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51128iC2E2A39AAA41A0A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1678903264762.png" alt="jthi_0-1678903264762.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you have JMP17 it is even easier as you get Box Path&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1678903306943.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51129i3581DAD6D8FB6ECA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1678903306943.png" alt="jthi_1-1678903306943.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 18:01:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-export-a-chart-WITHOUT-the-chart-header/m-p/612738#M81293</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-03-15T18:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I export a chart WITHOUT the chart header?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-export-a-chart-WITHOUT-the-chart-header/m-p/612800#M81306</link>
      <description>&lt;P&gt;Perfect! This is my first time hearing about the Properties window and Box Paths, but it's exactly what I needed. Thank you much!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 19:44:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-export-a-chart-WITHOUT-the-chart-header/m-p/612800#M81306</guid>
      <dc:creator>IMMunization</dc:creator>
      <dc:date>2023-03-15T19:44:35Z</dc:date>
    </item>
  </channel>
</rss>

