<?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 Add reference lines-allowing ranges, by column variable- on separate pages in Graph Builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777875#M95948</link>
    <description>&lt;P&gt;I have several columns of numeric data, along with one numeric-continuous datetime column, to the nearest second.&amp;nbsp; I can plot any or all of these by datetime in a time-series to view simultaneously.&amp;nbsp; There is a "group" character-nominal column that in Graph Builder, I can use to separate the analysis by page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is another numeric-continuous date column "Event Date" that is to the nearest day (joined from another table) that is matched to each "group" value.&amp;nbsp; There would be one unique Event Date value for a given "group" variable.&amp;nbsp; I would like to automate or script adding reference lines from the "Event Date" column to the x-axis, however with "Allow Ranges", setting the Min Value as the Event Date at 12:00:00AM, and Max Value as the Event Date at 11:59:59 PM based on the "group" column variable, with the intent each "group" would go on a separate page.&amp;nbsp; Below is an example of what it would look like on one page, along with the typical Reference Line dialog box in Axis Settings in Graph Builder for reference:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ashwint27_5-1722468506063.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66694i9AAA1C447CA5584F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ashwint27_5-1722468506063.png" alt="ashwint27_5-1722468506063.png" /&gt;&lt;/span&gt;&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="ashwint27_3-1722468130842.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66692i25054D8DDD03B6DA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ashwint27_3-1722468130842.png" alt="ashwint27_3-1722468130842.png" /&gt;&lt;/span&gt;&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;</description>
    <pubDate>Wed, 31 Jul 2024 23:29:45 GMT</pubDate>
    <dc:creator>ashwint27</dc:creator>
    <dc:date>2024-07-31T23:29:45Z</dc:date>
    <item>
      <title>Add reference lines-allowing ranges, by column variable- on separate pages in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777875#M95948</link>
      <description>&lt;P&gt;I have several columns of numeric data, along with one numeric-continuous datetime column, to the nearest second.&amp;nbsp; I can plot any or all of these by datetime in a time-series to view simultaneously.&amp;nbsp; There is a "group" character-nominal column that in Graph Builder, I can use to separate the analysis by page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is another numeric-continuous date column "Event Date" that is to the nearest day (joined from another table) that is matched to each "group" value.&amp;nbsp; There would be one unique Event Date value for a given "group" variable.&amp;nbsp; I would like to automate or script adding reference lines from the "Event Date" column to the x-axis, however with "Allow Ranges", setting the Min Value as the Event Date at 12:00:00AM, and Max Value as the Event Date at 11:59:59 PM based on the "group" column variable, with the intent each "group" would go on a separate page.&amp;nbsp; Below is an example of what it would look like on one page, along with the typical Reference Line dialog box in Axis Settings in Graph Builder for reference:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ashwint27_5-1722468506063.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66694i9AAA1C447CA5584F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ashwint27_5-1722468506063.png" alt="ashwint27_5-1722468506063.png" /&gt;&lt;/span&gt;&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="ashwint27_3-1722468130842.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66692i25054D8DDD03B6DA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ashwint27_3-1722468130842.png" alt="ashwint27_3-1722468130842.png" /&gt;&lt;/span&gt;&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;</description>
      <pubDate>Wed, 31 Jul 2024 23:29:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777875#M95948</guid>
      <dc:creator>ashwint27</dc:creator>
      <dc:date>2024-07-31T23:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference lines-allowing ranges, by column variable- on separate pages in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777896#M95949</link>
      <description>&lt;P&gt;If you select&amp;nbsp; to use a Dialog to setup the Graph Builder&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1722476977745.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66695i0FBFBB985BFF350D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1722476977745.png" alt="txnelson_0-1722476977745.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can use a By() column rather than specifying it as a Page column.&amp;nbsp; When you do this, each displayed Graph Builder display output can have separate range reference lines&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1722477139057.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66696iB0AC5AE100DF6BBD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1722477139057.png" alt="txnelson_1-1722477139057.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
	SendToByGroup( {:sex == "F"} ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ),
	By( :sex ),
	SendToByGroup(
		{:sex == "F"},
		SendToReport(
			Dispatch( {}, "weight", ScaleBox,
				{Add Ref Line(
					{100, 120},
					"Solid",
					"Medium Light Red",
					"",
					1,
					0.25
				)}
			)
		)
	),
	SendToByGroup(
		{:sex == "M"},
		SendToReport(
			Dispatch( {}, "weight", ScaleBox,
				{Add Ref Line(
					{140, 160},
					"Solid",
					"Medium Light Red",
					"",
					1,
					0.25
				)}
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2024 01:53:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777896#M95949</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-08-01T01:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference lines-allowing ranges, by column variable- on separate pages in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777902#M95951</link>
      <description>Thanks &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;.&lt;BR /&gt;This can work, but I'm wondering if instead of manually specifying the position of each By Group's reference lines, if I could call the Event Date column to set the reference line positions in some manner. Is that achievable?</description>
      <pubDate>Thu, 01 Aug 2024 04:40:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777902#M95951</guid>
      <dc:creator>ashwint27</dc:creator>
      <dc:date>2024-08-01T04:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference lines-allowing ranges, by column variable- on separate pages in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777914#M95953</link>
      <description>&lt;P&gt;Could you share an example of your data / create a mockup data? There might be some a bit trickier methods in graph builder to achieve this without relying to scripting.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 05:14:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777914#M95953</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-01T05:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference lines-allowing ranges, by column variable- on separate pages in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777938#M95959</link>
      <description>&lt;P&gt;Of course the reference ranges can be set based upon values within other columns, or from results from JMP platforms.&amp;nbsp; I was just illustrating a way to make the different levels of your Page column referenceable by changing to the use of a By().&amp;nbsp; Below is a simple expansion of the example I previously provided.&amp;nbsp; It sets the Reference Line range based upon the mean and std of the X axis column for each of the graphs&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1722506310410.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66707i5BC8BECFC303D4AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1722506310410.png" alt="txnelson_0-1722506310410.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

// This example sets the range of the reference lines based upon the mean +- 1 std
// of the weight column for each level of the sex column

Summarize( dt, sexGroup = by( :sex ), means = Mean( :weight ), stds = Std Dev( :weight ) );

Eval(
	Eval Expr(
		Graph Builder(
			SendToByGroup( {:sex == "F"} ),
			Variables( X( :weight ), Y( :height ) ),
			Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ),
			By( :sex ),
			SendToByGroup(
				{:sex == "F"},
				SendToReport(
					Dispatch( {}, "weight", ScaleBox,
						{Add Ref Line(
							{Expr( means[1] - stds[1] ), Expr( means[1] + stds[1] )},
							"Solid",
							"Medium Light Red",
							"",
							1,
							0.25
						)}
					)
				)
			),
			SendToByGroup(
				{:sex == "M"},
				SendToReport(
					Dispatch( {}, "weight", ScaleBox,
						{Add Ref Line(
							{Expr( means[2] - stds[2] ), Expr( means[2] + stds[2] )},
							"Solid",
							"Medium Light Red",
							"",
							1,
							0.25
						)}
					)
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;JMP's scripting language(JSL) has the ability to do just about anything you envision you need to do.&amp;nbsp; I suggest that you take the time to read the Scripting Guide which will provide you with the knowledge of how to JSL can accomplish what you want.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 10:04:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-lines-allowing-ranges-by-column-variable-on/m-p/777938#M95959</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-08-01T10:04:36Z</dc:date>
    </item>
  </channel>
</rss>

