<?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: Saving JMP animation in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Saving-JMP-animation/m-p/37025#M21742</link>
    <description>&lt;P&gt;You can find another example of saving an animated GIF with a Data Filter here:&amp;nbsp;&lt;A href="https://community.jmp.com/t5/JMP-Scripts/Save-a-Data-Filter-animation-as-an-animated-GIF/ta-p/24003" target="_self"&gt;Save a Data Filter animation as an animated GIF&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Mar 2017 14:58:24 GMT</pubDate>
    <dc:creator>JohnPonte</dc:creator>
    <dc:date>2017-03-10T14:58:24Z</dc:date>
    <item>
      <title>Saving JMP animation</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-JMP-animation/m-p/36971#M21695</link>
      <description>&lt;P&gt;Hello, I am quite new to JMP and have a question: Is it possible to save animation?&lt;/P&gt;&lt;P&gt;For example, if I do Fit Y by X on some&amp;nbsp;table and &amp;nbsp;then use data filter animation. Would it be possible to save the animation/clip?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 02:02:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-JMP-animation/m-p/36971#M21695</guid>
      <dc:creator>aumair</dc:creator>
      <dc:date>2017-03-09T02:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Saving JMP animation</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-JMP-animation/m-p/37008#M21727</link>
      <description>&lt;P&gt;If you are using JMP 13 on Windows, you can use the new JSL functionality for creating animated GIFs to save your Data Filter animation.&lt;/P&gt;
&lt;P&gt;Below is an example that will create a Graph Builder with a Local Data Filter and an animated GIF will be saved and opened. For more info, check out&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3977"&gt;@JohnPonte&lt;/a&gt;'s &lt;A href="https://community.jmp.com/t5/JMP-Scripts/Save-a-Bubble-Plot-animation-as-an-animated-GIF/ta-p/24038" target="_self"&gt;post about animated GIFs using Bubble Plot&lt;/A&gt;. I borrowed a lot of code from his hurricanes example in the script below. Theoretically, this can work on a current window that you have open if you run everything starting with the line "report = Current Report()."&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ),
	Local Data Filter(
		Add Filter(
			columns( :age ),
			Where( :age == 12 ),
			Display( :age, Size( 202, 114 ), List Display )
		)
	)
);

report = Current Report();

ldf_listBox = report[ListBoxBox(1)];

numLevels = NItems(ldf_ListBox &amp;lt;&amp;lt; Get ITems);

// Create a new image, same size as the graph we are going to capture
graphFrame = report[FrameBox(1)] &amp;lt;&amp;lt; getPicture();
{w, h} = graphFrame &amp;lt;&amp;lt; getSize();
img = newImage(w, h);

for(i=1,i&amp;lt;=numLevels,i++,
	
	// deselect old selection
	selectedItems = ldf_listBox &amp;lt;&amp;lt; Get Selected Indices;
	for(k=1,k&amp;lt;=nitems(selectedItems),k++,
		ldf_listBox &amp;lt;&amp;lt; set selected(selectedItems[k],0);
	);
	
	// set the next item selected
	ldf_listBox &amp;lt;&amp;lt; set selected(i);
	
	wait(0); // wait for the display to update
	// Capture frame for current graph and save to animated image
	graphFrame = report[FrameBox(1)] &amp;lt;&amp;lt; getPicture();
	{r, g, b} = graphFrame &amp;lt;&amp;lt; getPixels("rgb");
	img &amp;lt;&amp;lt; addFrame();
	img &amp;lt;&amp;lt; setFrameDuration(1000);  // Time between frames, in ms
	img &amp;lt;&amp;lt; setPixels("rgb", {r, g, b});	
	wait(0.5); // for demonstration purposes
);

// Remove inital blank frame
img &amp;lt;&amp;lt; removeFrame(0);

// Write out animated image
img &amp;lt;&amp;lt; saveImage ("$temp\animated.gif", gif);

// open the gif
open("$temp\animated.gif");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Edited to add the resulting GIF file:&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Resulting animated gif" style="width: 517px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/5589iA2AF911A20F15C67/image-size/large?v=v2&amp;amp;px=999" role="button" title="animated.gif" alt="Resulting animated gif" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Resulting animated gif&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 13:41:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-JMP-animation/m-p/37008#M21727</guid>
      <dc:creator>Justin_Chilton</dc:creator>
      <dc:date>2017-03-15T13:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Saving JMP animation</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-JMP-animation/m-p/37025#M21742</link>
      <description>&lt;P&gt;You can find another example of saving an animated GIF with a Data Filter here:&amp;nbsp;&lt;A href="https://community.jmp.com/t5/JMP-Scripts/Save-a-Data-Filter-animation-as-an-animated-GIF/ta-p/24003" target="_self"&gt;Save a Data Filter animation as an animated GIF&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 14:58:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-JMP-animation/m-p/37025#M21742</guid>
      <dc:creator>JohnPonte</dc:creator>
      <dc:date>2017-03-10T14:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Saving JMP animation</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-JMP-animation/m-p/37155#M21816</link>
      <description>&lt;P&gt;Thanks a lot!:)&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 20:07:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-JMP-animation/m-p/37155#M21816</guid>
      <dc:creator>aumair</dc:creator>
      <dc:date>2017-03-14T20:07:40Z</dc:date>
    </item>
  </channel>
</rss>

