cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
Ling-Zecheng
Level I

How to draw a custom interval?

I want to draw a graph like this, and I have my data “relative bias” “lower 90% bias” “upper 90% bias” also target potency for x axis.

I opened graph builder, and drug relative bias to y axis, target potency to x axis. and set error interval as custom interval, interval style as error bar. But I noticed that I can only put one of 90% relative bias in the interval box, where it automatically +- with the relative bias. However, I calculated that 90% upper and lower with exp(), so only one interval filling does not reflect the true circumstance. However should I do?
2 REPLIES 2
jthi
Super User

Re: How to draw a custom interval?

Which JMP version are you using? I'm using JMP18 and I think you should be able to use Custom Interval and add your limit columns to Interval graph zone

jthi_0-1756880868066.png

 

-Jarmo

Re: How to draw a custom interval?

Agreed, the Interval Dop Zone in Graph Builder is the way to do this. Your data table will need to have columns like: 

Target Potency Relative Bias Relative Bias + Relative Bias -

 

Then, create the Graph Builder with Target Potency in the X Role, Relative Bias in Y, and both Relative Bias + and Relative Bias - in the Interval Role. This creates your asymmetric upper and lower error bars. (No need to set Error Interval to Custom, it can be left in Auto). 

Looks like this: 

christianz_0-1756887189371.png

Here is the script you can run to recreate my table and graph: 

View more...

 

New Table( "Untitled 218",
	Add Rows( 6 ),
	New Script(
		"Graph Builder",
		Graph Builder(
			Size( 660, 549 ),
			Show Control Panel( 0 ),
			Variables(
				X( :Target Potency ),
				Y( :Relative Bias ),
				Interval( :"Rel Bias +"n ),
				Interval( :"Rel Bias -"n )
			),
			Elements( Points( X, Y, Legend( 3 ) ) ),
			SendToReport(
				Dispatch( {}, "Relative Bias", ScaleBox,
					{Format( "Best", 12 ), Min( -31.735686873312925 ),
					Max( 32.651231987799235 ), Inc( 10 ), Minor Ticks( 1 ),
					Add Ref Line( 0, "Sparse Dash", "Black", "", 5 )}
				),
				Dispatch( {}, "400", ScaleBox,
					{Legend Model(
						3,
						Type Properties( 0, "Marker", {Line Color( 21 )} ),
						Properties(
							0,
							{Line Color( 21 )},
							Item ID( "Relative Bias", 1 )
						)
					)}
				)
			)
		)
	),
	New Column( "Target Potency",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [25, 50, 75, 100, 150, 200] )
	),
	New Column( "Relative Bias",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [6, 8, 6, 2, 4, 3] )
	),
	New Column( "Rel Bias +",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [13, 12, 8, 3, 8, 6] )
	),
	New Column( "Rel Bias -",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [-1, 6, 3, -0.5, -1, -1] )
	)
)

 

Recommended Articles