<?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: Custom background color to show quadrants in Graph Builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/347755#M59868</link>
    <description>&lt;P&gt;JMP allows one to add graphic primitives to any of the graphical outputs within the system.&amp;nbsp; So to produce the below graph&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="quad1.PNG" style="width: 618px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29375i05998FA6A261D3CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="quad1.PNG" alt="quad1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You just right click on the native graph and select "Customize".&amp;nbsp; It brings up a window that allows you to add a script to the graph.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="quad2.PNG" style="width: 725px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29376i45447501F1AFFAFE/image-size/large?v=v2&amp;amp;px=999" role="button" title="quad2.PNG" alt="quad2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can then take the modified graph, and do a Save Graph which will look like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = open("$SAMPLE_DATA/big class.jmp");

Graph Builder(
	Size( 528, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 5 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"weight",
			ScaleBox,
			{Add Ref Line( 110, "Solid", "Black", "", 1 )}
		),
		Dispatch(
			{},
			"height",
			ScaleBox,
			{Add Ref Line( 60, "Solid", "Black", "", 1 )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Add Graphics Script(
				2,
				Description( "" ),
				Transparency( 0.5 );
				Fill Color( {1, 1, .5} );
				left = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmin;
				top = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmax;
				right = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmax;
				bottom = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmin;
				Fill Color( {1, 1, .5} );
				Rect( left, top, 110, 60, fill = 1 );
				Fill Color( "red" );
				Rect( 110, top, right, 60, fill = 1 );
				Fill Color( "green" );
				Rect( left, 60, 110, bottom, fill = 1 );
				Fill Color( "orange" );
				Rect( 110, 60, right, bottom, fill = 1 );
			), Grid Line Order( 1 ), Reference Line Order( 3 ),
			DispatchSeg(
				TopSeg( 1 ),
				{Set Script(
					Transparency( 0.5 );
					Fill Color( {1, 1, .5} );
					left = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmin;
					top = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmax;
					right = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmax;
					bottom = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmin;
					Fill Color( {1, 1, .5} );
					Rect( left, top, 110, 60, fill = 1 );
					Fill Color( "red" );
					Rect( 110, top, right, 60, fill = 1 );
					Fill Color( "green" );
					Rect( left, 60, 110, bottom, fill = 1 );
					Fill Color( "orange" );
					Rect( 110, 60, right, bottom, fill = 1 );
				)}
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, there is a simpler form that most programmers find more convenient&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = open("$SAMPLE_DATA/big class.jmp");

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 528, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 5 ) ) )
	);
report(gb)[FrameBox(1)] &amp;lt;&amp;lt; add graphics script(
	Transparency( 0.5 );
				Fill Color( {1, 1, .5} );
				left = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmin;
				top = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmax;
				right = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmax;
				bottom = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmin;
				Fill Color( {1, 1, .5} );
				Rect( left, top, 110, 60, fill = 1 );
				Fill Color( "red" );
				Rect( 110, top, right, 60, fill = 1 );
				Fill Color( "green" );
				Rect( left, 60, 110, bottom, fill = 1 );
				Fill Color( "orange" );
				Rect( 110, 60, right, bottom, fill = 1 );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Jan 2021 17:48:38 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-01-12T17:48:38Z</dc:date>
    <item>
      <title>Custom background color to show quadrants in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/347711#M59863</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I customize the background color in Graph Builder to show 4 different quadrants (i.e. Quadrant 1 is a different color than Quadrant 2 which is a different color that Quadrant 3, etc.)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!&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="EH1_0-1610468564936.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29374iB837A54CBEE79EC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EH1_0-1610468564936.png" alt="EH1_0-1610468564936.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:09:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/347711#M59863</guid>
      <dc:creator>EH1</dc:creator>
      <dc:date>2023-06-11T11:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom background color to show quadrants in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/347755#M59868</link>
      <description>&lt;P&gt;JMP allows one to add graphic primitives to any of the graphical outputs within the system.&amp;nbsp; So to produce the below graph&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="quad1.PNG" style="width: 618px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29375i05998FA6A261D3CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="quad1.PNG" alt="quad1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You just right click on the native graph and select "Customize".&amp;nbsp; It brings up a window that allows you to add a script to the graph.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="quad2.PNG" style="width: 725px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29376i45447501F1AFFAFE/image-size/large?v=v2&amp;amp;px=999" role="button" title="quad2.PNG" alt="quad2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can then take the modified graph, and do a Save Graph which will look like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = open("$SAMPLE_DATA/big class.jmp");

Graph Builder(
	Size( 528, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 5 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"weight",
			ScaleBox,
			{Add Ref Line( 110, "Solid", "Black", "", 1 )}
		),
		Dispatch(
			{},
			"height",
			ScaleBox,
			{Add Ref Line( 60, "Solid", "Black", "", 1 )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Add Graphics Script(
				2,
				Description( "" ),
				Transparency( 0.5 );
				Fill Color( {1, 1, .5} );
				left = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmin;
				top = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmax;
				right = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmax;
				bottom = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmin;
				Fill Color( {1, 1, .5} );
				Rect( left, top, 110, 60, fill = 1 );
				Fill Color( "red" );
				Rect( 110, top, right, 60, fill = 1 );
				Fill Color( "green" );
				Rect( left, 60, 110, bottom, fill = 1 );
				Fill Color( "orange" );
				Rect( 110, 60, right, bottom, fill = 1 );
			), Grid Line Order( 1 ), Reference Line Order( 3 ),
			DispatchSeg(
				TopSeg( 1 ),
				{Set Script(
					Transparency( 0.5 );
					Fill Color( {1, 1, .5} );
					left = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmin;
					top = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmax;
					right = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmax;
					bottom = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmin;
					Fill Color( {1, 1, .5} );
					Rect( left, top, 110, 60, fill = 1 );
					Fill Color( "red" );
					Rect( 110, top, right, 60, fill = 1 );
					Fill Color( "green" );
					Rect( left, 60, 110, bottom, fill = 1 );
					Fill Color( "orange" );
					Rect( 110, 60, right, bottom, fill = 1 );
				)}
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, there is a simpler form that most programmers find more convenient&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = open("$SAMPLE_DATA/big class.jmp");

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 528, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 5 ) ) )
	);
report(gb)[FrameBox(1)] &amp;lt;&amp;lt; add graphics script(
	Transparency( 0.5 );
				Fill Color( {1, 1, .5} );
				left = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmin;
				top = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmax;
				right = Current Report()[axisbox( 1 )] &amp;lt;&amp;lt; getmax;
				bottom = Current Report()[axisbox( 2 )] &amp;lt;&amp;lt; getmin;
				Fill Color( {1, 1, .5} );
				Rect( left, top, 110, 60, fill = 1 );
				Fill Color( "red" );
				Rect( 110, top, right, 60, fill = 1 );
				Fill Color( "green" );
				Rect( left, 60, 110, bottom, fill = 1 );
				Fill Color( "orange" );
				Rect( 110, 60, right, bottom, fill = 1 );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jan 2021 17:48:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/347755#M59868</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-01-12T17:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Custom background color to show quadrants in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/347950#M59885</link>
      <description>&lt;P&gt;Thank you so much for your help!!! &amp;nbsp;I greatly appreciate it!!!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 22:30:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/347950#M59885</guid>
      <dc:creator>EH1</dc:creator>
      <dc:date>2021-01-12T22:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Custom background color to show quadrants in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/725934#M91082</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Interesting to be able to mark certain parts of the graph with a color.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is there any chance you could do this without scripting??&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have only done it partly using reference lines with overlapping (which I would like to avoid) - see the attached screenshot.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 21:11:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/725934#M91082</guid>
      <dc:creator>Bertelsen92</dc:creator>
      <dc:date>2024-02-28T21:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom background color to show quadrants in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/726094#M91088</link>
      <description>&lt;P&gt;There are a couple of ways that you can add items to your graphs.&lt;/P&gt;
&lt;P&gt;Annotations&lt;/P&gt;
&lt;P&gt;The Tool Bar above the JMP Display Window contains some icons that permit the adding of annotation items to graphs&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1709157630318.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/61656iC8A31A959D82479E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1709157630318.png" alt="txnelson_0-1709157630318.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Text, Arrows and Line, Polygons and Circles can be added.&amp;nbsp; The are added on top of the graphics display.&lt;/P&gt;
&lt;P&gt;You can also right click on the graph and choose "Customize" which allows for the addition of items using graphic primitives.&amp;nbsp; While these use JSL, they are very simple to use and they allow you to add colored areas, text, lines, etc and they can be positioned at any level of the display.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 22:06:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/726094#M91088</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-02-28T22:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Custom background color to show quadrants in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/729180#M91143</link>
      <description>&lt;P&gt;Thanks a lot for your reply. These are excellent tips and both make good sense.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 11:30:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-background-color-to-show-quadrants-in-Graph-Builder/m-p/729180#M91143</guid>
      <dc:creator>Bertelsen92</dc:creator>
      <dc:date>2024-03-01T11:30:59Z</dc:date>
    </item>
  </channel>
</rss>

