cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
lkramer
Level I

How do I add shading Between Targets with Run Lines over top?

Hi JMP Community,

 

I've caught myself in a bit of a pickle trying to figure this out. I have a set of run data from 6 different runs that I'd like to plot as a line graph over the shaded area between our targets. Could someone explain how to do this? If it's possible. Below is the data and targets (lime green and black) that I have and I'd like to shade the area in light grey between the two target values and possibly remove the lines for the targets if that's possible.

 

lkramer_0-1634219384848.png

Thank you!

 

- L
1 REPLY 1
ian_jmp
Level X

Re: How do I add shading Between Targets with Run Lines over top?

You might be able to use the 'Area' element in Graph Builder with style 'Range'. For example:

Screenshot 2021-10-14 at 15.56.41.png

NamesDefaultToHere(1);

n = 10;
dt = NewTable("Two Traces",
		NewColumn("x", Numeric, Continous, Values(Transpose(Index(1, n, 1)))),
		NewColumn("y1", Numeric, Continous, Values(J(n, 1, RandomInteger(1, 5)))),
		NewColumn("y2", Numeric, Continous, Values(J(n, 1, RandomInteger(5, 10)))),
	);

gb = dt << Graph Builder(
				Variables( X( :x ), Y( :y1 ), Y( :y2, Position( 1 ) ) ),
				Elements(
					Area( X, Y( 1 ), Y( 2 ), Legend( 7 ), Area Style( "Range" ) ),
					Line( X, Y( 1 ), Y( 2 ), Legend( 8 ) )
				),
				SendToReport(
					Dispatch(
						{},
						"400",
						ScaleBox,
						{Legend Model(
							7,
							Properties(
								0,
								{Fill Color( 32 ), Transparency( 0.2 )},
								Item ID( "y1..y2", 1 )
							)
						)}
					)
				)
			);