<?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: Save Bivariate plot to JPEG in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Save-Bivariate-plot-to-JPEG/m-p/49554#M28180</link>
    <description>&lt;P&gt;Apparently, at least in 13.2.1, the Save Picture message works but is not documented. At least for me, just adding&amp;nbsp;parentheses to the original code works.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2018 17:37:22 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2018-01-11T17:37:22Z</dc:date>
    <item>
      <title>Save Bivariate plot to JPEG</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Bivariate-plot-to-JPEG/m-p/49520#M28157</link>
      <description>&lt;P&gt;Hi, I was able to get the&amp;nbsp;Bivariate plot. But I'm unable to&amp;nbsp;save the plot as a picture as I have error in my save.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be great. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;BR /&gt;Open("C:\jmp_data\NamesData.jmp", window bounds(600, 50, 500, 400), window state(maximized)); 

window_DATA = New Window("NAMES SHOW", Bivariate(Y(:Name("AGES")), X(:Name("GENDER")), Fit Line({Line Color({100, 50, 50})}))) &amp;lt;&amp;lt; Maximize Display &amp;lt;&amp;lt; Set Window Icon("FitYByX"); &lt;BR /&gt;
window_DATA &amp;lt;&amp;lt; save picture( "C:\jmp_data\NamesAge.JPG", JPEG );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 22:42:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Bivariate-plot-to-JPEG/m-p/49520#M28157</guid>
      <dc:creator>sam_t</dc:creator>
      <dc:date>2018-01-10T22:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Save Bivariate plot to JPEG</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Bivariate-plot-to-JPEG/m-p/49521#M28158</link>
      <description>&lt;P&gt;I assume the error you get relates to needing a scriptable object.&amp;nbsp; Right now you send a message to the window and save the result of the sent message to window_DATA.&amp;nbsp; You instead want to save a reference to the window itself and then send a message to it.&amp;nbsp; Two options are to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Do it all in one 'line', similar to your code now, but use order of operations to make sure the variable is defined before sending a message to the window, or&lt;/LI&gt;&lt;LI&gt;Do this in two lines.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I recommend the latter as it is more readable.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here( 1 );

dt = Open("$Sample_data/iris.jmp"); 

//All at once
( window_DATA_1 = New Window( "NAMES SHOW", 
	Bivariate( 
		Y( :Name( "Sepal length" ) ), 
		X( :Name( "Petal length" ) ), 
		Fit Line( {Line Color( {100, 50, 50} )} )
	) 
) ) &amp;lt;&amp;lt; Maximize Display &amp;lt;&amp;lt; Set Window Icon( "FitYByX" );

window_DATA_1 &amp;lt;&amp;lt; save picture( "$Desktop\Picture_1.JPG", JPEG );

//In two steps
window_DATA_2 = New Window( "NAMES SHOW", 
	Bivariate( 
		Y( :Name( "Sepal length" ) ), 
		X( :Name( "Petal length" ) ), 
		Fit Line( {Line Color( {100, 50, 50} )} )
	) 
);

window_DATA_2 &amp;lt;&amp;lt; Maximize Display &amp;lt;&amp;lt; Set Window Icon( "FitYByX" );

window_DATA_2 &amp;lt;&amp;lt; save picture( "$Desktop\Picture_2.JPG", JPEG );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jan 2018 01:01:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Bivariate-plot-to-JPEG/m-p/49521#M28158</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2018-01-11T01:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Save Bivariate plot to JPEG</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Bivariate-plot-to-JPEG/m-p/49522#M28159</link>
      <description>&lt;P&gt;The Window Object does not have a Save Picture message available to it.&amp;nbsp; See the Scripting Index for the messages that can be passed to the Window Object.&amp;nbsp; What you need to do is to save an object within the window that has the Save Picture message supported. Here is one possible solution&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );
Open(
	"C:\jmp_data\NamesData.jmp",
	window bounds( 600, 50, 500, 400 ),
	window state( maximized )
); 

window_DATA = New Window( "NAMES SHOW",
	Biv = Bivariate(
		Y( :Name( "AGES" ) ),
		X( :Name( "GENDER" ) ),
		Fit Line( {Line Color( {100, 50, 50} )} )
	)
) &amp;lt;&amp;lt; Maximize Display &amp;lt;&amp;lt; Set Window Icon( "FitYByX" );
report( Biv ) &amp;lt;&amp;lt; save picture( "C:\jmp_data\NamesAge.JPG", JPEG );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jan 2018 03:12:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Bivariate-plot-to-JPEG/m-p/49522#M28159</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-01-11T03:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Save Bivariate plot to JPEG</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Bivariate-plot-to-JPEG/m-p/49554#M28180</link>
      <description>&lt;P&gt;Apparently, at least in 13.2.1, the Save Picture message works but is not documented. At least for me, just adding&amp;nbsp;parentheses to the original code works.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 17:37:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Bivariate-plot-to-JPEG/m-p/49554#M28180</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2018-01-11T17:37:22Z</dc:date>
    </item>
  </channel>
</rss>

