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
bobzsun
Level I

Graph Builder: creating error bands instead of bars?

I have data I want to plot in a line chart as mean +/- standard error. However, I would like to plot the standard errors as shaded bands above and below my mean line rather than as individual error bars. I'd like the end result to look something like this:

 

medium.png

I know I can plot the mean+SE and mean-SE as separate lines but even then I can't figure out how to shade the area in between. Any ideas? Either in point-and-click or a script?

1 ACCEPTED SOLUTION

Accepted Solutions
Byron_JMP
Staff

Re: Graph Builder: creating error bands instead of bars?

unfortunately, this might be easier to describe with a little JSL than it is with a series of steps.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Graph Builder(
	Size( 741, 350 ),
	Show Control Panel( 0 ),
	Variables(
		X( :height ),
		Y( :weight ),
		Y( :plus, Position( 1 ) ),
		Y( :minus, Position( 1 ) )
	),
	Elements(
		Line( X, Y( 1 ), Legend( 6 ) ),
		Area( X, Y( 2 ), Y( 3 ), Legend( 7 ), Area Style( "Range" ) )
	)
);

The key is to add your center and upper and lower columns to the Y axis.  (in Graph Builder)

Then, remove all the other graph elements, followed by adding the connect the dots line, and then the overlay lines (Area). 

Next, go into the variables role for the line and uncheck your upper and lower column. Go into the Area, and make the type a Range, go into the variables and uncheck the center column. (don't uncheck the Y column)

If the line isnt visible, ie. behind the range area line, then right click on the white space of the graph, go to Customize, and reoder teh elements.  (little plus/minus buttons)

 

JMP Systems Engineer, Health and Life Sciences (Pharma)

View solution in original post

1 REPLY 1
Byron_JMP
Staff

Re: Graph Builder: creating error bands instead of bars?

unfortunately, this might be easier to describe with a little JSL than it is with a series of steps.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Graph Builder(
	Size( 741, 350 ),
	Show Control Panel( 0 ),
	Variables(
		X( :height ),
		Y( :weight ),
		Y( :plus, Position( 1 ) ),
		Y( :minus, Position( 1 ) )
	),
	Elements(
		Line( X, Y( 1 ), Legend( 6 ) ),
		Area( X, Y( 2 ), Y( 3 ), Legend( 7 ), Area Style( "Range" ) )
	)
);

The key is to add your center and upper and lower columns to the Y axis.  (in Graph Builder)

Then, remove all the other graph elements, followed by adding the connect the dots line, and then the overlay lines (Area). 

Next, go into the variables role for the line and uncheck your upper and lower column. Go into the Area, and make the type a Range, go into the variables and uncheck the center column. (don't uncheck the Y column)

If the line isnt visible, ie. behind the range area line, then right click on the white space of the graph, go to Customize, and reoder teh elements.  (little plus/minus buttons)

 

JMP Systems Engineer, Health and Life Sciences (Pharma)