<?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: Possible to add automatic graph creation in JSL script? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322097#M57208</link>
    <description>&lt;P&gt;I can save it in JMP 15 as a report using the UI "Save As" but I was not able to figure out how to do it using JSL.&lt;/P&gt;
&lt;P&gt;It is a good question for the dev team. Are you in the Discovery Conference? The "Meet the Developers" virtual booth is open right now and our JSL experts are there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2020 18:30:53 GMT</pubDate>
    <dc:creator>nascif_jmp</dc:creator>
    <dc:date>2020-10-15T18:30:53Z</dc:date>
    <item>
      <title>Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321284#M57137</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a JSL to organize experimental data which updates 22 data tables (corresponding to products), each containing columns for different physicochemical parameters (e.g. pH, osmolality). Currently, I am manually creating graphs using the Graph Builder feature and 'saving script to data table', however I was wondering if it was possible to write this into the main JSL script that is generating my data tables?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each graph displays a particular parameter on the y-axis, and time on the x-axis, so I want to write code that generates graphs in each data table for each parameter, rather than having to manually make the graphs and save the script.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:20:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321284#M57137</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2023-06-10T23:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321306#M57139</link>
      <description>Absolutely, you can add the ability to run a Graph Builder platform in JSL in your main program.,  If you interactively run the Graph Builder you want, you can then go to the red triangle  and select save script.  if you save it to a script window, you will be able to see the JSL required to produce the graph.  Without more specifics about your script, it is pretty hard to go beyond my above suggestion.</description>
      <pubDate>Tue, 13 Oct 2020 19:08:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321306#M57139</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-10-13T19:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321332#M57141</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of a graph builder script in my program:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 1263, 901 ),
	Variables(
		X( :Name( "Time (Months)" ) ),
		Y( :Name( "% Adsorption" ) ),
		Overlay( :Lot Number )
	),
	Elements(
		Points( X, Y, Legend( 13 ) ),
		Line Of Fit( X, Y, Legend( 15 ), Confidence of Fit( 0 ) )
	));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My concern is that due to the size of my script, I would have to write 100+ iterations of the above script to cover all different data tables and y-axis parameters. I was wondering if I could create a list of all the y-axis parameters and call upon that list in the above script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My main script basically sorts a raw data database into 22 'product subset' data tables, each of which is specific for a particular product. There are about 30 different physicochemical parameters, each of which needs to have a separate graph vs. time. However, not every parameter applies to every product. I.e. a particular data table may only contain 10 of the 30 parameters.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 19:43:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321332#M57141</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2020-10-13T19:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321334#M57142</link>
      <description>There are multiple ways of doing this.  You could just create a separate data table that has a column for every product, and then place in the rows, for the physicochemical parameters for that product.  Then you script would just have to determine the product it is working on, and read from the column in the configuration data table the parameters to process.&lt;BR /&gt;If you haven't read the Scripting Guide, it is now the time to do so.</description>
      <pubDate>Tue, 13 Oct 2020 19:48:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321334#M57142</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-10-13T19:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321416#M57145</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/20754"&gt;@DanAlexander&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I second &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt; that checking the JSL Scripting Guide would really be useful given the complexity of what you are trying to do.&lt;/P&gt;
&lt;P&gt;But to get you started, here is an example that attempts to do something similar to what you described.&lt;/P&gt;
&lt;P&gt;The "setup" function creates a few data views from the sample data "CrimeData.jmp" file, to simulate your product subsets, and associates them with different subset of the table columns.&lt;/P&gt;
&lt;P&gt;The "build_graphs" shows how to use JSL to create graphs from a template. It is a simple matter of using variable substitution.&lt;/P&gt;
&lt;P&gt;The graphs are combined in a single window using a V List Box.&lt;/P&gt;
&lt;P&gt;I hope this is helpful!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 21:33:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321416#M57145</guid>
      <dc:creator>nascif_jmp</dc:creator>
      <dc:date>2020-10-13T21:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321418#M57146</link>
      <description>&lt;P&gt;I'm just wondering, it may be possible to do this using the 'For each row' function, if each row corresponds to a different y-axis parameter like you said.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 21:55:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321418#M57146</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2020-10-13T21:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321566#M57160</link>
      <description>&lt;P&gt;Thank you for sharing the example script with the Setup and Build-graphs functions. I was able to adapt these functions for my script successfully!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering, is it possible to save the graph window as a separate file in the same directory as my data tables? I use the 'Close' function throughout my script to save the different data tables, but I am unsure how to use the function to save the graph windows generated using V List Box in the 'Build_graphs' function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example throughout my script I have variations of:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Close( dtProduct, Save( save_path_example || "dtProduct.JMP"));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Oct 2020 14:55:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321566#M57160</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2020-10-14T14:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321624#M57166</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;Yes, you sure can. I didn't know how but a quick look in the available options for the Window Object in the Scripting Index pointed me to the "Save Window Report" function.&lt;/P&gt;
&lt;P&gt;Please see the attached file. It fixes a bug in the build_graphs function (it was not returning the window reference) and adds the following line to the end of the script:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;win &amp;lt;&amp;lt; Save Window Report( "automated_gb2.jrp", embed data( 1 ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="messages"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Oct 2020 15:39:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/321624#M57166</guid>
      <dc:creator>nascif_jmp</dc:creator>
      <dc:date>2020-10-14T15:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322093#M57204</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the 'Save Window Report' function, however the script is giving the error in the attached image.&amp;nbsp; Also strangely I did not find that function in the Scripting index for Window Object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error reads as follows: 'Send Expects Scriptable Object in access or evaluation of 'Send' ,win &amp;lt;&amp;lt; /*###*/Save Window Report ("automated_gb2.jrp", embed data(1)) /*###*/&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 17:36:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322093#M57204</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2020-10-15T17:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322094#M57205</link>
      <description>Hello,&lt;BR /&gt;1) I made a change to build_graphs, the first version was not returning the window reference. Did you update yours?&lt;BR /&gt;2) What version of JMP you're using?</description>
      <pubDate>Thu, 15 Oct 2020 17:51:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322094#M57205</guid>
      <dc:creator>nascif_jmp</dc:creator>
      <dc:date>2020-10-15T17:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322095#M57206</link>
      <description>I am so sorry, I didn't check. Save Window to Report was introduced in version 16.0.</description>
      <pubDate>Thu, 15 Oct 2020 17:54:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322095#M57206</guid>
      <dc:creator>nascif_jmp</dc:creator>
      <dc:date>2020-10-15T17:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322096#M57207</link>
      <description>&lt;P&gt;Ah I see. I am using JMP 15. So I cannot use the Save Window to Report function.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 18:17:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322096#M57207</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2020-10-15T18:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322097#M57208</link>
      <description>&lt;P&gt;I can save it in JMP 15 as a report using the UI "Save As" but I was not able to figure out how to do it using JSL.&lt;/P&gt;
&lt;P&gt;It is a good question for the dev team. Are you in the Discovery Conference? The "Meet the Developers" virtual booth is open right now and our JSL experts are there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 18:30:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322097#M57208</guid>
      <dc:creator>nascif_jmp</dc:creator>
      <dc:date>2020-10-15T18:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322230#M57215</link>
      <description>&lt;P&gt;All right, please see attached for JMP 15 compatible version.&lt;/P&gt;
&lt;DIV class="messages"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 15 Oct 2020 20:51:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322230#M57215</guid>
      <dc:creator>nascif_jmp</dc:creator>
      <dc:date>2020-10-15T20:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322418#M57239</link>
      <description>&lt;P&gt;Thank you! I was finally able to save the graphs using your revised script.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 13:44:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322418#M57239</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2020-10-16T13:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add automatic graph creation in JSL script?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322421#M57241</link>
      <description>I am glad to hear it is working for you!  If you want something more interactive, take a look at the new graphlets feature in JMP 15. I think it might be a good fit for your data. The implicit hierarchies would make for nice drill-downs.</description>
      <pubDate>Fri, 16 Oct 2020 13:58:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-add-automatic-graph-creation-in-JSL-script/m-p/322421#M57241</guid>
      <dc:creator>nascif_jmp</dc:creator>
      <dc:date>2020-10-16T13:58:34Z</dc:date>
    </item>
  </channel>
</rss>

