cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Yngeinstn
Level IV

graph with different target or spec limits

I have looked over some of the discussion regarding this matter but i have only found things that deal with shadding of a range..

 

I am seeking some help with just adding lines (see picture). Those lines represent the upper and lower spec limits (Y Axis) and the start and end points of the screening criteria (X Axis)


Thank YouPlot With Spec Lines.png

4 REPLIES 4
ian_jmp
Staff

Re: graph with different target or spec limits

You could use a graphics script. In the sample case, find 'HLine()' in 'Help > Scripting Index'. For eaxmple:

 

Screen Shot 2019-05-02 at 14.39.05.png

is created by this JSL:

NamesDefaultToHere(1);

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

gb = dt << Graph Builder(
						Size( 529, 453 ),
						Show Control Panel( 0 ),
						Show Legend( 0 ),
						Variables( X( :weight ), Y( :height ) ),
						Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) ),
						SendToReport(
							Dispatch(
								{},
								"Graph Builder",
								FrameBox,
								{Add Graphics Script(
									1,
									Description( "LowerSpec" ),
									Pen Color( "Red" );
									H Line( 100, 140, 60 );
								), Add Graphics Script(
									3,
									Description( "UpperSpec" ),
									Pen Color( "Red" );
									H Line( 100, 140, 67 );
								), Grid Line Order( 2 ), Reference Line Order( 4 )}
							)
						)
					);

Once you have the plot, right click on the graphics box and select 'Customize...'.

Yngeinstn
Level IV

Re: graph with different target or spec limits

@ian_jmp 

 

I apologize for the extremely late response but i am finally at a point where I can use this. I got how the H Line() but does this only work for a straight horizontal line? I would like a sloped line...

From your script I would like line to start at x = 100 , y = 60 and go to x = 140, y = 62.5. We tend to complicate things with our spec limits

 

I am trying to use the examples from this post https://community.jmp.com/t5/Discussions/Add-Graphics-Script-H-line-with-variable/m-p/238599 as well..

 

txnelson
Super User

Re: graph with different target or spec limits

JSL has a complete set of native graphic commands.  You can see them in the Scripting Index

     Help=>Scripting Index

if you click on the "Graphics"graphics.PNG

The Line() function is probably what you want, it can generate a line in any X/Y orientation

Jim
Yngeinstn
Level IV

Re: graph with different target or spec limits

Thank you.. I will look into that