<?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: Background reference plot in Graph Builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/328474#M57772</link>
    <description>&lt;P&gt;Given your description, the base reference bacteria, bacteria a will be displayed on every graph that you have data for that combination of factors.&amp;nbsp; If your question is, how do you get the base level a bacteria to show up in every graph, it is just a matter of replicating the growth rate data and time data for the combinations of factors that are missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope I am understanding what your want.&amp;nbsp; If not, please tell me what I am not getting.&lt;/P&gt;</description>
    <pubDate>Sat, 31 Oct 2020 00:28:51 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-10-31T00:28:51Z</dc:date>
    <item>
      <title>Background reference plot in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/328429#M57767</link>
      <description>&lt;P&gt;Suppose I have a baseline data set of the growth rate of bacteria A over time at room temperature and 40% humidity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I run an experiment on bacteria B where I vary the temperature and humidity levels to see how those affect the growth rate, wanting to see them relative to bacteria A.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My columns are: &amp;nbsp;bacteriaType, temp, humidity, time, growthRate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to do this: &amp;nbsp;time -&amp;gt; X, growthRate -&amp;gt; Y, temp -&amp;gt; groupX, humidity -&amp;gt; groupY, and bacteriaType -&amp;gt; Overlay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... and have the reference data (bacteria A) be plotted on every plot behind the bacteria B data. &amp;nbsp;But I don't have it for every temperature and humidity level.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do this?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:07:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/328429#M57767</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2023-06-11T11:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Background reference plot in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/328474#M57772</link>
      <description>&lt;P&gt;Given your description, the base reference bacteria, bacteria a will be displayed on every graph that you have data for that combination of factors.&amp;nbsp; If your question is, how do you get the base level a bacteria to show up in every graph, it is just a matter of replicating the growth rate data and time data for the combinations of factors that are missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope I am understanding what your want.&amp;nbsp; If not, please tell me what I am not getting.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Oct 2020 00:28:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/328474#M57772</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-10-31T00:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Background reference plot in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/328477#M57773</link>
      <description>&lt;P&gt;Yep, you got it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping to not have to replicate the same data for bacteria A 25 times to make it show up in each graph...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wondered if there was a script I could use to generate the same plot, similar to how you can draw shapes into the plot windows with "Customize Graph", then adding a "script"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or if there was some way to have it assume that a given row/record should be plotted in the current plot if there is *no* data in the corresponding field as well as if the field matches the value represented by the column of plots?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Oct 2020 01:40:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/328477#M57773</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2020-10-31T01:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Background reference plot in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/328478#M57774</link>
      <description>&lt;P&gt;It sounds daunting but replicating the data is can be done fairly quickly by joining the growth data to a table of the available options&amp;nbsp;using a 'cartesian join' and then concatenating it to your original data.&amp;nbsp; Here is an example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dtResults = New Table( "Results",
	Add Rows( 240 ),
	New Column( "time",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Mod( Row() - 1, 10 ) )
	),
	New Column( "humidity",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Sequence( 30, 60, 10, 60 ) ),
		Set Selected
	),
	New Column( "Bacteria Type",
		Character,
		"Nominal",
		Value Labels( {"1" = "a", "2" = "b"} ),
		Use Value Labels( 1 ),
		Set Values( Repeat( {"b"},240) )
	),
	New Column( "magnitude",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( If( :time == 0, Random Uniform( 0.5, 1 ), Lag( :magnitude ) ) )
	),
	New Column( "temp",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Sequence( 80, 90, 2, 10 ) )
	),
	New Column( "growthRate",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula(
			If( :time == 0,
				0,
				(1 - :time / (:time + 1)) * Ln( :time * 2 ) * :magnitude * :humidity
				 * :temp + Random Normal( 0, 100 )
			)
		)
	)
);


dtRef = New Table( "Reference",
	Add Rows( 10 ),
	New Column( "time",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Row() - 1 )
	),
	New Column( "growthRate",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula(
			If( :time == 0,
				0,
				(1 - :time / (:time + 1)) * Ln( :time * 2 ) * 0.7 * 40 * 80
				+Random Normal( 0, 100 )
			)
		)
	),
	New Column( "Bacteria Type",
		Character,
		"Nominal",
		Set Selected,
		Set Values( {"a", "a", "a", "a", "a", "a", "a", "a", "a", "a"} )
	)
);

dtAll = New Table( "All Conditions",
	Add Rows( 24 ),
	New Column( "temp",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Sequence( 80, 90, 2 ) )
	),
	New Column( "humidity",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Sequence( 30, 60, 10, 6 ) ),
		Set Selected
	),
	Set Row States(
		[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
	)
);

wait(1);

dtRefAll = dtRef &amp;lt;&amp;lt; Join(
	With( dtAll ),
	Cartesian Join,
	Copy formula(1)
);
dtRefAll &amp;lt;&amp;lt; Set Name( "All Reference Data" );

dtForGraph = dtResults &amp;lt;&amp;lt; Concatenate( dtRefAll, Keep Formulas );
dtForGraph &amp;lt;&amp;lt; Set Name("For Graphing");

dtForGraph &amp;lt;&amp;lt; Graph Builder(
	Size( 676, 633 ),
	Show Control Panel( 0 ),
	Variables(
		X( :time ),
		Y( :growthRate ),
		Group X( :temp ),
		Group Y( :humidity ),
		Overlay( :Bacteria Type )
	),
	Elements( Points( X, Y, Legend( 10 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				10,
				Properties( 0, {Line Color( 32 )}, Item ID( "a", 1 ) ),
				Properties( 1, {Line Color( 56 )}, Item ID( "b", 1 ) )
			)}
		),
		Dispatch( {}, "400", LegendBox, {Set Title( "Bacteria" )} )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;</description>
      <pubDate>Sat, 31 Oct 2020 01:45:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/328478#M57774</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2020-10-31T01:45:09Z</dc:date>
    </item>
    <item>
      <title>There's a function called "Y Function()" that lets me plo...</title>
      <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/329915#M57912</link>
      <description>&lt;P&gt;There's a function called "Y Function()" that lets me plot directly into each plot in Graph Builder using the "Customize Graph" window, which is super cool...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a similar function that will let me plot data from the main data table via that same interface? &amp;nbsp;That would solve my problem without requiring me to create a data table that's significantly larger.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 03:38:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/329915#M57912</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2020-11-05T03:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: There's a function called "Y Function()" that lets me plo...</title>
      <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/329945#M57918</link>
      <description>&lt;P&gt;The Customize option that is available from graphs in JMP is an interface into JMP's ability to use JSL to use base level graphic routines to add to the display.&amp;nbsp; Here is a simple example taken from the Scripting Index.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate( Y( :weight ), X( :height ), FitLine );
rbiv = biv &amp;lt;&amp;lt; report;
framebox = rbiv[frame box( 1 )];
framebox &amp;lt;&amp;lt; Add Graphics Script(
	Transparency( 0.5 );
	Fill Color( {1.0, 0.5, 0.0} );
	Polygon( [60, 72, 57], [75, 120, 120] );
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="add1.PNG" style="width: 414px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/28087iC6C2C6DBE811A18D/image-size/large?v=v2&amp;amp;px=999" role="button" title="add1.PNG" alt="add1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The Y Function() is just one of the graphic primitives that are available to add to any displayed graph.&amp;nbsp; Or, one can also write to a display object called Graph Box() and generate an original, stand alone graphical display.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All of these graphical functions are documented in the Scripting Index, under "Graphics"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="add2.PNG" style="width: 918px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/28088iF51FCB18699A1679/image-size/large?v=v2&amp;amp;px=999" role="button" title="add2.PNG" alt="add2.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&amp;nbsp;So to answer you question,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, you could add JSL to each of your graphs that would read from the original data table and plot the values.&amp;nbsp; One would just have to write the JSL to take the values from the data table and use the Marker, Pen Color, Line, etc. functions to build the graphical display.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 09:44:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/329945#M57918</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-11-05T09:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: There's a function called "Y Function()" that lets me plo...</title>
      <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/329971#M57922</link>
      <description>&lt;P&gt;Here is a simple example of taking a reference group(age 12 individuals) and graphing their data on to all graphs produced.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="add3.PNG" style="width: 422px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/28092iF2CDE639B31013B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="add3.PNG" alt="add3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is the graph for the 13 year old's, with the 12 year old's data displayed with the squares.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// Get the values to be displayed on all graphs
theRows = dt &amp;lt;&amp;lt; get rows where( :Age == 12);
	xMat = :height[theRows];
	yMat = :weight[theRows];
	
// Create the graph
biv = dt &amp;lt;&amp;lt; Bivariate( Y( :weight ), X( :height ), FitLine, by(:age) );

// Add the data to each graph produced
rbiv = biv &amp;lt;&amp;lt; report;
(rbiv &amp;lt;&amp;lt; xpath( "//FrameBox" )) &amp;lt;&amp;lt; Add Graphics Script(	
	marker( marker state(3), xMat, yMat);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Nov 2020 10:35:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/329971#M57922</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-11-05T10:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: There's a function called "Y Function()" that lets me plo...</title>
      <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/329994#M57925</link>
      <description>&lt;P&gt;One caution about&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;'s solution. It demonstrates the JSL capability that you asked about well. However, using variables in a graphics script can lead to unexpected and undesirable behavior. For example, such a script might break if you journal this window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This concern depends on the larger context of your analysis plan.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 11:24:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/329994#M57925</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-11-05T11:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: There's a function called "Y Function()" that lets me plo...</title>
      <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/330206#M57951</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;,&amp;nbsp;would evaluating those variables first eliminate the behavior you mention, for example by replacing the last lines of &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;'s script with this this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval( Eval expr( 
	(rbiv &amp;lt;&amp;lt; xpath( "//FrameBox" )) &amp;lt;&amp;lt; Add Graphics Script(	
		marker( marker state(3), Expr( xMat ), Expr( yMat ) );
	)
) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 18:26:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/330206#M57951</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2020-11-05T18:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: There's a function called "Y Function()" that lets me plo...</title>
      <link>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/330591#M57971</link>
      <description>&lt;P&gt;Yes, that is my suggestion.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 14:43:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-reference-plot-in-Graph-Builder/m-p/330591#M57971</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-11-06T14:43:20Z</dc:date>
    </item>
  </channel>
</rss>

