<?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 change the X-axis in Graph Builder and JSL so Nominal X-variables share same space/name in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-change-the-X-axis-in-Graph-Builder-and-JSL-so-Nominal-X/m-p/49542#M28171</link>
    <description>&lt;P&gt;In your original post, your script contains this line:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;      Variables( X( :Sample ), Y( :Mass ), Overlay( :Sample Name ) ),&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Try replacing it with this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;      Variables(
            X( Transform Column( "Day", Formula( Num( Word( 2, :Sample, "-" ) ) ) ) ),
            Y( :Mass ),
            Overlay( :Sample Name )
      ),&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Edit:&amp;nbsp;&lt;/STRONG&gt;you'll probably also need to delete your SendToReport block if you do it this way.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2018 15:53:53 GMT</pubDate>
    <dc:creator>mjoner</dc:creator>
    <dc:date>2018-01-11T15:53:53Z</dc:date>
    <item>
      <title>How do I change the X-axis in Graph Builder and JSL so Nominal X-variables share same space/name?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-change-the-X-axis-in-Graph-Builder-and-JSL-so-Nominal-X/m-p/49524#M28161</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have been trying to&amp;nbsp; create a script that graphs a parameter of a multiple samples. The samples are named in such a way that it is XX-AA, where XX is the ID/name of the sample, and AA is the timestamp of the sample (day 1,2,3, and so forth).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My current issue is that I am trying to plot multiple samples on top of each other using the graph builder, and also seeing what changes I can do within the JSL script. The intention is to have the graph plot a parameter Y against the formatted&amp;nbsp;sample nomenclature XX-AA, but to change the X-axis labels so that it plots against the timestamp AA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I currently have a Graph Builder script for two samples, FJ and WW. I do plan to add more different samples in to plot on top of each other, so another issue that comes to light is the inefficiency of the script as seen below. In addition you can see from the attachment that FJ and WW are not really on top of each other, and the X-axis ends up looking like 2,4,6,8 then followed by another 2,4,6,8.&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;Graph Builder(
       Size( 532, 447 ),
       Show Control Panel( 0 ),
       Variables( X( :Sample ), Y( :Mass ), Overlay( :Sample Name ) ),
       Elements( Points( X, Y, Legend( 3 ), Jitter( 0 ) ), Line( X, Y, Legend( 4 ) ) ),
       SendToReport(
             Dispatch(
                    {},
                    "Sample ID",
                    ScaleBox,
                    {Label Row(
                          {Tick Mark( Label( "FJ-02" ), Label( "2" ) ),
                          Tick Mark( Label( "FJ-03" ), Label( "3" ) ),
                          Tick Mark( Label( "FJ-04" ), Label( "4" ) ),
                          Tick Mark( Label( "FJ-05" ), Label( "5" ) ),
                          Tick Mark( Label( "FJ-06" ), Label( "6" ) ),
                          Tick Mark( Label( "FJ-07" ), Label( "7" ) ),
                          Tick Mark( Label( "FJ-08" ), Label( "8" ) ),
                          Tick Mark( Label( "WW-02" ), Label( "2" ) ),
                          Tick Mark( Label( "WW-03" ), Label( "3" ) ),
                          Tick Mark( Label( "WW-04" ), Label( "4" ) ),
                          Tick Mark( Label( "WW-05" ), Label( "5" ) ),
                          Tick Mark( Label( "WW-06" ), Label( "6" ) ),
                          Tick Mark( Label( "WW-08" ), Label( "8" ) )}
                    )}
             ),
             Dispatch( {}, "X title", TextEditBox, {Set Text( "Time (days)" )} )
       )
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One way I was thinking of solving the issue was to have the script create a new column that would only indicate the day by only looking at the timestamp (AA) component of the sample name's format of XX-AA. I was wondering if there are also alternative methods that may be more efficient/effective.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="unintended graph.PNG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8912iA75C4FFB12825719/image-size/medium?v=v2&amp;amp;px=400" role="button" title="unintended graph.PNG" alt="unintended graph.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 15:54:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-change-the-X-axis-in-Graph-Builder-and-JSL-so-Nominal-X/m-p/49524#M28161</guid>
      <dc:creator>liqinglei419</dc:creator>
      <dc:date>2018-01-11T15:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the X-axis in Graph Builder and JSL so Nominal X-variables share same space/name</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-change-the-X-axis-in-Graph-Builder-and-JSL-so-Nominal-X/m-p/49542#M28171</link>
      <description>&lt;P&gt;In your original post, your script contains this line:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;      Variables( X( :Sample ), Y( :Mass ), Overlay( :Sample Name ) ),&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Try replacing it with this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;      Variables(
            X( Transform Column( "Day", Formula( Num( Word( 2, :Sample, "-" ) ) ) ) ),
            Y( :Mass ),
            Overlay( :Sample Name )
      ),&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Edit:&amp;nbsp;&lt;/STRONG&gt;you'll probably also need to delete your SendToReport block if you do it this way.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 15:53:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-change-the-X-axis-in-Graph-Builder-and-JSL-so-Nominal-X/m-p/49542#M28171</guid>
      <dc:creator>mjoner</dc:creator>
      <dc:date>2018-01-11T15:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the X-axis in Graph Builder and JSL so Nominal X-variables share same space/name</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-change-the-X-axis-in-Graph-Builder-and-JSL-so-Nominal-X/m-p/49624#M28227</link>
      <description>&lt;P&gt;Thanks so much! I really appreciate it!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 22:26:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-change-the-X-axis-in-Graph-Builder-and-JSL-so-Nominal-X/m-p/49624#M28227</guid>
      <dc:creator>liqinglei419</dc:creator>
      <dc:date>2018-01-12T22:26:12Z</dc:date>
    </item>
  </channel>
</rss>

