<?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: Graph Builder &amp;gt; Spaghetti Plot With Average: How to create without Customization? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Graph-Builder-gt-Spaghetti-Plot-With-Average-How-to-create/m-p/393093#M64344</link>
    <description>&lt;P&gt;I think you could do this with a single overlay criteria that had 6 levels: blue dark, blue light, etc..&amp;nbsp; Then customize color with the legend.&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="ih_0-1623679070186.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33516iA1E064A831E355BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ih_0-1623679070186.png" alt="ih_0-1623679070186.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Script:&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);

dt = Open("$Sample_data\Design Experiment\Algorithm Data.jmp");

dt &amp;lt;&amp;lt; New Column("Overlay", Character, "Nominal", Formula(:Algorithm || "__" || :Compiler));

dt &amp;lt;&amp;lt; Graph Builder(
	Size( 834, 534 ),
	Show Control Panel( 0 ),
	Variables( X( :Beta ), Y( :Alpha ), Overlay( :Overlay ) ),
	Elements( Line( X, Y, Legend( 10 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				10,
				Properties( 0, {Line Color( 53 )}, Item ID( "Dynamic__A", 1 ) ),
				Properties(
					1,
					{Line Color( 53 ), Transparency( 0.3 )},
					Item ID( "Dynamic__B", 1 )
				),
				Properties( 2, {Line Color( 20 )}, Item ID( "Greedy__A", 1 ) ),
				Properties(
					3,
					{Line Color( 20 ), Transparency( 0.3 )},
					Item ID( "Greedy__B", 1 )
				),
				Properties( 4, {Line Color( 6 )}, Item ID( "Transform__A", 1 ) ),
				Properties(
					5,
					{Line Color( 6 ), Transparency( 0.3 )},
					Item ID( "Transform__B", 1 )
				)
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jun 2021 14:17:59 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2021-06-14T14:17:59Z</dc:date>
    <item>
      <title>Graph Builder &gt; Spaghetti Plot With Average: How to create without Customization?</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-gt-Spaghetti-Plot-With-Average-How-to-create/m-p/392934#M64320</link>
      <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;I'm trying to produce a large number of "spaghetti plots" with average lines for 3 categories as shown below but the only way I was able to build this example is by using a Custom Graphics Script: Is there a way to produce this graph more efficiently by for example combining more than 1 overlay criteria? Also, what is the proper syntax to assign specific color to the Markers added in the Graphics Script?&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="Thierry_S_1-1623534495867.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33506iAD3D163055DAC800/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Thierry_S_1-1623534495867.png" alt="Thierry_S_1-1623534495867.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Graphics Script Associated with Plot Above
Pen Size( 4 );
Marker Size( 8 );
Pen Color( blue );
Line( {0, 0}, {2.0, 0.284}, {8.0, 0.564} );
Marker( {0, 0}, {2.0, 0.284}, {8.0, 0.564} );
Pen Color( green );
Line( {0, 0}, {2.0, 12.93}, {8.0, 12.24} );
Marker( {0, 0}, {2.0, 12.93}, {8.0, 12.24} );
Pen Color( purple );
Line( {0, 0}, {2.0, 6.17}, {8.0, 7.92} );
Marker( {0, 0}, {2.0, 6.17}, {8.0, 7.92} );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you for your help.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:15:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-gt-Spaghetti-Plot-With-Average-How-to-create/m-p/392934#M64320</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2023-06-11T11:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder &gt; Spaghetti Plot With Average: How to create without Customization?</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-gt-Spaghetti-Plot-With-Average-How-to-create/m-p/392947#M64324</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11634"&gt;@Thierry_S&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Below is a hard wired version of your graph(close to your version that is).&amp;nbsp; The hardwired part could be generalized without much effort.&amp;nbsp; I hope you find it useful, and if not, at least amusing&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1623548029113.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33507i023AF1F73CAD92B8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1623548029113.png" alt="txnelson_0-1623548029113.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = New Table( "Example",
	New Column( "Group", character ),
	New Column( "Run" ),
	New Column( "Duration" ),
	New Column( "value" )
);

For( g = 1, g &amp;lt;= 3, g++,
	For( r = 1, r &amp;lt;= 15, r++,
		dt &amp;lt;&amp;lt; add rows( 1 );
		dt:value[N Rows( dt )] = 0;
		dt:Duration[N Rows( dt )] = 0;
		dt:group[N Rows( dt )] = "Group " || Char( g );
		dt:run[N Rows( dt )] = r;
	)
);

For( g = 1, g &amp;lt;= 3, g++,
	If(
		g == 1, a = 0,
		g == 2, a = 8,
		a = 13
	);
	
	For( r = 1, r &amp;lt;= 15, r++,
		d = 2;
		dt &amp;lt;&amp;lt; add rows( 1 );
		dt:value[N Rows( dt )] = a + Random Uniform( a - 3, a + 3 );
		dt:Duration[N Rows( dt )] = d;
		dt:group[N Rows( dt )] = "Group " || Char( g );
		dt:run[N Rows( dt )] = r;
		dt &amp;lt;&amp;lt; add rows( 1 );
		d = 8;
		dt:run[N Rows( dt )] = r;
		dt:value[N Rows( dt )] = dt:value[N Rows( dt ) - 1] + Random Uniform( a - 3, a + 3 );
		dt:Duration[N Rows( dt )] = d;
		dt:group[N Rows( dt )] = "Group " || Char( g );
		
	);
);

dt &amp;lt;&amp;lt; new column( "Group Run", character, set each value(:Group || " " || char( :run )));

dt:group run &amp;lt;&amp;lt; set property(
	"value colors",
	{"Group 1 1" = blue, "Group 1 2" = blue, "Group 1 3" = blue, "Group 1 4" = blue,
	"Group 1 5" = blue, "Group 1 6" = blue, "Group 1 7" = blue, "Group 1 8" = blue,
	"Group 1 9" = blue, "Group 1 10" = blue, "Group 1 11" = blue, "Group 1 12" = blue, "Group 1 13"
	 = blue, "Group 1 14" = blue, "Group 1 15" = blue, "Mean 1 1" = blue, "Group 2 1" = purple, "Group 2 2" = purple, "Group 2 3"
	 = purple, "Group 2 4" = purple, "Group 2 5" = purple, "Group 2 6" = purple, "Group 2 7" =
	purple, "Group 2 8" = purple, "Group 2 9" = purple, "Group 2 10" = purple, "Group 2 11" =
	purple, "Group 2 12" = purple, "Group 2 13" = purple, "Group 2 14" = purple, "Group 2 15" =
	purple, "Mean 2 1" = purple, "Group 3 1" = green, "Group 3 2" = green, "Group 3 3" = green, "Group 3 4" = green,
	"Group 3 5" = green, "Group 3 6" = green, "Group 3 7" = green, "Group 3 8" = green,
	"Group 3 9" = green, "Group 3 10" = green, "Group 3 11" = green, "Group 3 12" = green,
	"Group 3 13" = green, "Group 3 14" = green, "Group 3 15" = green, "Mean 3 1" = green }
);

dtSum = dt &amp;lt;&amp;lt; Summary(
	Group( :Group, :Duration ),
	Mean( :value ),
	Freq( "None" ),
	Weight( "None" ),
	statistics column name format( "column" ),
	Link to original data table( 0 )
);

dtSum &amp;lt;&amp;lt; delete columns(:N Rows);
dtSum &amp;lt;&amp;lt; New Column("Group Run",
	character, set each value("Mean " || char(word(2, :Group)) || " 1")
);

dtFinal = dt &amp;lt;&amp;lt; Concatenate(dtSum
);

gb = Graph Builder(
	Variables( X( :Duration ), Y( :value ), Overlay( :Group Run ) ),
	Elements( Line( X, Y, Legend( 7 ) ) ),
	show control panel( 0 ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				7,
				Properties( 0, {Line Width( 1 )}, Item ID( "Group 1 1", 1 ) ),
				Properties( 1, {Line Width( 1 )}, Item ID( "Group 1 2", 1 ) ),
				Properties( 2, {Line Width( 1 )}, Item ID( "Group 1 3", 1 ) ),
				Properties( 3, {Line Width( 1 )}, Item ID( "Group 1 4", 1 ) ),
				Properties( 4, {Line Width( 1 )}, Item ID( "Group 1 5", 1 ) ),
				Properties( 5, {Line Width( 1 )}, Item ID( "Group 1 6", 1 ) ),
				Properties( 6, {Line Width( 1 )}, Item ID( "Group 1 7", 1 ) ),
				Properties( 7, {Line Width( 1 )}, Item ID( "Group 1 8", 1 ) ),
				Properties( 8, {Line Width( 1 )}, Item ID( "Group 1 9", 1 ) ),
				Properties( 9, {Line Width( 1 )}, Item ID( "Group 1 10", 1 ) ),
				Properties( 10, {Line Width( 1 )}, Item ID( "Group 1 11", 1 ) ),
				Properties( 11, {Line Width( 1 )}, Item ID( "Group 1 12", 1 ) ),
				Properties( 12, {Line Width( 1 )}, Item ID( "Group 1 13", 1 ) ),
				Properties( 13, {Line Width( 1 )}, Item ID( "Group 1 14", 1 ) ),
				Properties( 14, {Line Width( 1 )}, Item ID( "Group 1 15", 1 ) ),
				Properties( 15, {Line Width( 1 )}, Item ID( "Group 2 1", 1 ) ),
				Properties( 16, {Line Width( 1 )}, Item ID( "Group 2 2", 1 ) ),
				Properties( 17, {Line Width( 1 )}, Item ID( "Group 2 3", 1 ) ),
				Properties( 18, {Line Width( 1 )}, Item ID( "Group 2 4", 1 ) ),
				Properties( 19, {Line Width( 1 )}, Item ID( "Group 2 5", 1 ) ),
				Properties( 20, {Line Width( 1 )}, Item ID( "Group 2 6", 1 ) ),
				Properties( 21, {Line Width( 1 )}, Item ID( "Group 2 7", 1 ) ),
				Properties( 22, {Line Width( 1 )}, Item ID( "Group 2 8", 1 ) ),
				Properties( 23, {Line Width( 1 )}, Item ID( "Group 2 9", 1 ) ),
				Properties( 24, {Line Width( 1 )}, Item ID( "Group 2 10", 1 ) ),
				Properties( 25, {Line Width( 1 )}, Item ID( "Group 2 11", 1 ) ),
				Properties( 26, {Line Width( 1 )}, Item ID( "Group 2 12", 1 ) ),
				Properties( 27, {Line Width( 1 )}, Item ID( "Group 2 13", 1 ) ),
				Properties( 28, {Line Width( 1 )}, Item ID( "Group 2 14", 1 ) ),
				Properties( 29, {Line Width( 1 )}, Item ID( "Group 2 15", 1 ) ),
				Properties( 30, {Line Width( 1 )}, Item ID( "Group 3 1", 1 ) ),
				Properties( 31, {Line Width( 1 )}, Item ID( "Group 3 2", 1 ) ),
				Properties( 32, {Line Width( 1 )}, Item ID( "Group 3 3", 1 ) ),
				Properties( 33, {Line Width( 1 )}, Item ID( "Group 3 4", 1 ) ),
				Properties( 34, {Line Width( 1 )}, Item ID( "Group 3 5", 1 ) ),
				Properties( 35, {Line Width( 1 )}, Item ID( "Group 3 6", 1 ) ),
				Properties( 36, {Line Width( 1 )}, Item ID( "Group 3 7", 1 ) ),
				Properties( 37, {Line Width( 1 )}, Item ID( "Group 3 8", 1 ) ),
				Properties( 38, {Line Width( 1 )}, Item ID( "Group 3 9", 1 ) ),
				Properties( 39, {Line Width( 1 )}, Item ID( "Group 3 10", 1 ) ),
				Properties( 40, {Line Width( 1 )}, Item ID( "Group 3 11", 1 ) ),
				Properties( 41, {Line Width( 1 )}, Item ID( "Group 3 12", 1 ) ),
				Properties( 42, {Line Width( 1 )}, Item ID( "Group 3 13", 1 ) ),
				Properties( 43, {Line Width( 1 )}, Item ID( "Group 3 14", 1 ) ),
				Properties( 44, {Line Width( 1 )}, Item ID( "Group 3 15", 1 ) ),
				Properties( 45, {Line Width( 4 )}, Item ID( "Mean 1 1", 1 ) ),
				Properties( 46, {Line Width( 4 )}, Item ID( "Mean 2 1", 1 ) ),
				Properties( 47, {Line Width( 4 )}, Item ID( "Mean 3 1", 1 ) )
			)}
)));

report(gb)[LegendBox(1)]&amp;lt;&amp;lt;visibility("collapse");



&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jun 2021 01:34:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-gt-Spaghetti-Plot-With-Average-How-to-create/m-p/392947#M64324</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-06-13T01:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder &gt; Spaghetti Plot With Average: How to create without Customization?</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-gt-Spaghetti-Plot-With-Average-How-to-create/m-p/393093#M64344</link>
      <description>&lt;P&gt;I think you could do this with a single overlay criteria that had 6 levels: blue dark, blue light, etc..&amp;nbsp; Then customize color with the legend.&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="ih_0-1623679070186.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33516iA1E064A831E355BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ih_0-1623679070186.png" alt="ih_0-1623679070186.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Script:&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);

dt = Open("$Sample_data\Design Experiment\Algorithm Data.jmp");

dt &amp;lt;&amp;lt; New Column("Overlay", Character, "Nominal", Formula(:Algorithm || "__" || :Compiler));

dt &amp;lt;&amp;lt; Graph Builder(
	Size( 834, 534 ),
	Show Control Panel( 0 ),
	Variables( X( :Beta ), Y( :Alpha ), Overlay( :Overlay ) ),
	Elements( Line( X, Y, Legend( 10 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				10,
				Properties( 0, {Line Color( 53 )}, Item ID( "Dynamic__A", 1 ) ),
				Properties(
					1,
					{Line Color( 53 ), Transparency( 0.3 )},
					Item ID( "Dynamic__B", 1 )
				),
				Properties( 2, {Line Color( 20 )}, Item ID( "Greedy__A", 1 ) ),
				Properties(
					3,
					{Line Color( 20 ), Transparency( 0.3 )},
					Item ID( "Greedy__B", 1 )
				),
				Properties( 4, {Line Color( 6 )}, Item ID( "Transform__A", 1 ) ),
				Properties(
					5,
					{Line Color( 6 ), Transparency( 0.3 )},
					Item ID( "Transform__B", 1 )
				)
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 14:17:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-gt-Spaghetti-Plot-With-Average-How-to-create/m-p/393093#M64344</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-06-14T14:17:59Z</dc:date>
    </item>
  </channel>
</rss>

