cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
SDF1
Super User

How to change only sections of a graph's background color

Hi All,

 

  I am interested in scripting a solution that allows me to change sections of a graph's background color. I know how to manually do this with editing the axes of a graph, but this changes everything vertically (or horizontally) over that range. I want to change sections that are bounded in both X and Y.

 

For example, I want to take the following graph and change it from this:

SDF1_0-1670603505866.png

To something like this:

SDF1_1-1670603656707.png

JMP does this with the Process Capability platform and Process Performance Plot, so I'm pretty sure it's possible, but I just don't know how to do it. Preferably, the background colors will change when changing the graph's axes, like it does in the Process Performance Plot.

 

  Any thoughts/feedback is much appreciated.

 

Thanks!,

DS

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to change only sections of a graph's background color

The Rect() graphics function can create such colored areas. Be sure to call Rect() before the Marker() function so that the colors do not obscure the points.

 

Example:

Names Default to Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

obj = dt << Bivariate(
	Y( :weight ),
	X( :height ),
	Fit Line( {Line Color( {212, 73, 88} )} ),
	SendToReport(
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{Add Graphics Script(
				4,
				Description( "" ),
				Fill Color( "blue" );
				Rect( 50, 120, 60, 60, 1 );
			)}
		)
	)
);

View solution in original post

3 REPLIES 3

Re: How to change only sections of a graph's background color

The Rect() graphics function can create such colored areas. Be sure to call Rect() before the Marker() function so that the colors do not obscure the points.

 

Example:

Names Default to Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

obj = dt << Bivariate(
	Y( :weight ),
	X( :height ),
	Fit Line( {Line Color( {212, 73, 88} )} ),
	SendToReport(
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{Add Graphics Script(
				4,
				Description( "" ),
				Fill Color( "blue" );
				Rect( 50, 120, 60, 60, 1 );
			)}
		)
	)
);
SDF1
Super User

Re: How to change only sections of a graph's background color

Hi @Mark_Bailey ,

 

  Thanks for the quick response, that is exactly what I'm looking for.

 

Thanks!,

DS

lala
Level VII

Re: How to change only sections of a graph's background color