cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-626191%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E3%82%B0%E3%83%A9%E3%83%95%E3%83%93%E3%83%AB%E3%83%80%E3%83%BC%E3%81%A7%E3%82%B0%E3%83%A9%E3%83%87%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E8%83%8C%E6%99%AF%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-626191%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E3%83%9E%E3%83%83%E3%82%AD%E3%83%B3%E3%82%BC%E3%83%BC%20GE%20%E3%83%9E%E3%83%88%E3%83%AA%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E8%A6%8B%E3%81%88%E3%82%8B%209%20%E3%81%A4%E3%81%AE%E6%AD%A3%E6%96%B9%E5%BD%A2%E3%82%92%E5%90%AB%E3%82%80%E6%95%A3%E5%B8%83%E5%9B%B3%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%80%81%E3%81%9D%E3%82%8C%E3%82%89%E3%81%AE%E6%AD%A3%E6%96%B9%E5%BD%A2%E3%81%AB%E3%83%87%E3%83%BC%E3%82%BF%20%E3%83%9D%E3%82%A4%E3%83%B3%E3%83%88%E3%82%92%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%81%97%E3%81%9F%E3%81%84%E3%81%A8%E8%80%83%E3%81%88%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E5%B7%A6%E4%B8%8B%E3%81%8C%E6%9C%80%E4%BD%8E%E5%80%A4%E3%81%AB%E7%AD%89%E3%81%97%E3%81%8F%E3%80%81%E5%8F%B3%E4%B8%8A%E3%81%8C%E6%9C%80%E9%AB%98%E5%80%A4%E3%81%AB%E7%AD%89%E3%81%97%E3%81%84%E5%A0%B4%E5%90%88%E3%80%81%E5%B7%A6%E4%B8%8B%E9%9A%85%E3%81%AE%E8%B5%A4%E3%81%A8%E5%8F%B3%E4%B8%8A%E3%81%AE%E7%B7%91%E3%81%8B%E3%82%89%E5%A7%8B%E3%81%BE%E3%82%8A%E3%80%81%E4%B8%AD%E5%A4%AE%E3%81%AB%E9%BB%84%E8%89%B2%E3%81%AE%E5%B8%AF%E3%81%8C%E3%81%82%E3%82%8B%E3%82%B0%E3%83%A9%E3%83%87%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E6%96%9C%E3%82%81%E3%81%AE%E8%83%8C%E6%99%AF%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%A7%E3%81%99%20(%E6%B7%BB%E4%BB%98%E3%81%AE%20jpg%20%E3%82%92%E5%8F%82%E7%85%A7)%20%EF%BC%89%E3%80%82%20Excel%E3%81%A7%E3%81%AF%E3%80%81%E6%95%A3%E5%B8%83%E5%9B%B3%E3%81%A7%E3%81%93%E3%82%8C%E3%82%92%E8%A1%8C%E3%81%86%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%20%E3%82%B0%E3%83%A9%E3%83%95%E3%83%93%E3%83%AB%E3%83%80%E3%83%BC%E3%81%A7%E3%81%93%E3%81%AE%E8%83%8C%E6%99%AF%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-626191%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3E%E3%82%B0%E3%83%A9%E3%83%95%E3%82%A3%E3%83%83%E3%82%AF%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-626266%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E3%82%B0%E3%83%A9%E3%83%95%20%E3%83%93%E3%83%AB%E3%83%80%E3%83%BC%E3%81%A7%E3%82%B0%E3%83%A9%E3%83%87%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E8%83%8C%E6%99%AF%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-626266%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E3%82%B0%E3%83%A9%E3%83%87%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%92%E8%83%8C%E6%99%AF%E7%94%BB%E5%83%8F%E3%81%A8%E3%81%97%E3%81%A6%E8%BF%BD%E5%8A%A0%E3%81%97%E3%80%81%E3%81%9D%E3%81%AE%E4%B8%8A%E3%81%AB%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E9%87%8D%E3%81%AD%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E3%81%82%E3%81%AA%E3%81%9F%E3%81%8C%E6%8F%90%E4%BE%9B%E3%81%97%E3%81%9F.jpg%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E5%88%A5%E3%81%AE%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82JMP%20%E3%81%AE%E3%82%B0%E3%83%A9%E3%83%95%20box()%20%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E6%A7%8B%E7%AF%89%E3%81%A7%E3%81%8D%E3%82%8B%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22txnelson_0-1682511472714.png%22%20style%3D%22width%3A%20640px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1682511472714.png%22%20style%3D%22width%3A%20640px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1682511472714.png%22%20style%3D%22width%3A%20640px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F52369iE7C5EACA16F00EF1%2Fimage-dimensions%2F640x332%3Fv%3Dv2%22%20width%3D%22640%22%20height%3D%22332%22%20role%3D%22button%22%20title%3D%22txnelson_0-1682511472714.png%22%20alt%3D%22txnelson_0-1682511472714.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EJSL%E3%81%AF%E3%81%93%E3%81%A1%E3%82%89%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20New%20Table(%20%22example%22%2C%0A%20Add%20Rows(%207%20)%2C%0A%20New%20Column(%20%22x%22%2C%0A%20%20Numeric%2C%0A%20%20%22Continuous%22%2C%0A%20%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20%20Set%20Values(%20%5B0.655%2C%200.655%2C%200.655%2C%201.69%2C%201.69%2C%202.715%2C%202.715%5D%20)%2C%0A%20%20Set%20Display%20Width(%2038%20)%0A%20)%2C%0A%20New%20Column(%20%22y%22%2C%0A%20%20Numeric%2C%0A%20%20%22Continuous%22%2C%0A%20%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20%20Set%20Values(%20%5B9.65%2C%205.6%2C%201.52%2C%205.6%2C%201.52%2C%205.6%2C%201.52%5D%20)%2C%0A%20%20Set%20Display%20Width(%2072%20)%0A%20)%2C%0A%20New%20Column(%20%22size%22%2C%0A%20%20Numeric%2C%0A%20%20%22Continuous%22%2C%0A%20%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20%20Set%20Values(%20%5B20%2C%2020%2C%2020%2C%2020%2C%2020%2C%2020%2C%2020%5D%20)%0A%20)%2C%0A%20Set%20Row%20States(%20%5B8192%2C%208384%2C%208384%2C%208384%2C%208384%2C%208384%2C%208384%5D%20)%0A)%3B%0A%0Aop%20%3D%20Graph%20Builder(%0A%20Size(%201120%2C%20456%20)%2C%0A%20Show%20Control%20Panel(%200%20)%2C%0A%20Variables(%20X(%20%3Ax%20)%2C%20Y(%20%3Ay%20)%2C%20Size(%20%3Asize%20)%20)%2C%0A%20Elements(%20Points(%20X%2C%20Y%2C%20Legend(%207%20)%20)%20)%2C%0A%20SendToReport(%0A%20%20Dispatch(%20%7B%7D%2C%20%22x%22%2C%20ScaleBox%2C%20%7BMin(%200.15%20)%2C%20Max(%203.2%20)%2C%20Inc(%200.5%20)%2C%20Minor%20Ticks(%201%20)%7D%20)%2C%0A%20%20Dispatch(%0A%20%20%20%7B%7D%2C%0A%20%20%20%22y%22%2C%0A%20%20%20ScaleBox%2C%0A%20%20%20%7BMin(%20-0.635918367346939%20)%2C%20Max(%2011.6721345272803%20)%2C%20Inc(%202%20)%2C%20Minor%20Ticks(%201%20)%7D%0A%20%20)%2C%0A%20%20Dispatch(%20%7B%7D%2C%20%22400%22%2C%20LegendBox%2C%20%7BLegend%20Position(%20%7B7%2C%20%5B-1%2C%20-1%5D%7D%20)%7D%20)%0A%20)%0A)%3B%0Aopr1%20%3D%20op%20%26lt%3B%26lt%3B%20report%3B%0Aopr2%20%3D%20opr1%20%26lt%3B%26lt%3B%20Clone%20Box%3B%0Aopr1%20%26lt%3B%26lt%3B%20append(%20opr2%20)%3B%0Afb1%20%3D%20opr1%5BFrame%20Box(%201%20)%5D%3B%0Afb1%20%26lt%3B%26lt%3B%20Add%20Image(%0A%20Open(%20Convert%20File%20Path(%20%22%3CPATH%20to%3D%22%22%20the%3D%22%22%20image%3D%22%22%3E.jpg%22%20)%20)%2C%0A%20Transparency(%200.9%20)%2C%0A%20Bounds(%0A%20%20Left(%200.135416666666667%20)%2C%0A%20%20Right(%203.26041666666667%20)%2C%0A%20%20Top(%2011.8333333333333%20)%2C%0A%20%20Bottom(%20-1%20)%0A%20)%2C%0A%20SetSize(%20%7B300%2C%20210%7D%20)%0A)%3B%0Afb1%20%26lt%3B%26lt%3B%20Copy%20Picture%3B%0Afb2%20%3D%20opr2%5BFrame%20Box(%201%20)%5D%3B%0Afb2%20%26lt%3B%26lt%3B%20Paste%20Background%20Image%3B%3C%2FPATH%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
MarcP
Level III

How do I get a gradient background in graph builder

I want to create a scatter plot with 9 squares that looks like a McKinsey GE matrix, and plot data points in those squares. If the bottom left equals the lowest values and top right the highest value, I would like to have a gradient diagonal background, starting with red in the lower left corner and green in the top right with a yellow band in the middle (see attached jpg). In excel I can do this in a scatter plot. How do I create this background in graph builder?

2 REPLIES 2
txnelson
Super User

Re: How do I get a gradient background in graph builder

I was able to add the gradient as a background image, and then overlayed data on top of it.  I am using the .jpg that you supplied.  You would need to create a separate image.  I believe that it could be build using a graph box() in JMP.

txnelson_0-1682511472714.png

Here is the JSL

Names Default To Here( 1 );
dt = New Table( "example",
	Add Rows( 7 ),
	New Column( "x",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [0.655, 0.655, 0.655, 1.69, 1.69, 2.715, 2.715] ),
		Set Display Width( 38 )
	),
	New Column( "y",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [9.65, 5.6, 1.52, 5.6, 1.52, 5.6, 1.52] ),
		Set Display Width( 72 )
	),
	New Column( "size",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [20, 20, 20, 20, 20, 20, 20] )
	),
	Set Row States( [8192, 8384, 8384, 8384, 8384, 8384, 8384] )
);

op = Graph Builder(
	Size( 1120, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :x ), Y( :y ), Size( :size ) ),
	Elements( Points( X, Y, Legend( 7 ) ) ),
	SendToReport(
		Dispatch( {}, "x", ScaleBox, {Min( 0.15 ), Max( 3.2 ), Inc( 0.5 ), Minor Ticks( 1 )} ),
		Dispatch(
			{},
			"y",
			ScaleBox,
			{Min( -0.635918367346939 ), Max( 11.6721345272803 ), Inc( 2 ), Minor Ticks( 1 )}
		),
		Dispatch( {}, "400", LegendBox, {Legend Position( {7, [-1, -1]} )} )
	)
);
opr1 = op << report;
opr2 = opr1 << Clone Box;
opr1 << append( opr2 );
fb1 = opr1[Frame Box( 1 )];
fb1 << Add Image(
	Open( Convert File Path( "<path to the image>.jpg" ) ),
	Transparency( 0.9 ),
	Bounds(
		Left( 0.135416666666667 ),
		Right( 3.26041666666667 ),
		Top( 11.8333333333333 ),
		Bottom( -1 )
	),
	SetSize( {300, 210} )
);
fb1 << Copy Picture;
fb2 = opr2[Frame Box( 1 )];
fb2 << Paste Background Image;
Jim
MarcP
Level III

Re: How do I get a gradient background in graph builder

Thanks Jim,

 

Apparently a bit more complex than excel.

 

Marc

Recommended Articles