Subscribe Bookmark RSS Feed

Create horizontal border to separate y-grouped plots

tobben24

New Contributor

Joined:

Nov 2, 2016

Hi,

 

I want to create a horizontal border to seperate my y-grouped plots. I have attached a screen shot show with black crosses where I want to create the border.

 

Untitled.png

2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Here is an example script that adds an annotation line to the graph.  I simply used the annotation tools to draw the line, and then captured the script.

Names default to here(1);

dt=open("$SAMPLE_DATA\big class.jmp");

Graph Builder(
	Size( 587, 495 ),
	Variables( X( :weight ), Y( :height ), Group Y( :sex ) ),
	Elements( Points( X, Y, Legend( 7 ) ) ),
	SendToReport(
		Dispatch( {}, "height", ScaleBox, {Min( 56.9527534300518 )} ),
		Dispatch(
			{},
			"",
			GraphBuilderContainerBox,
			Add Line Annotation(
				Line( {52, 251}, {550, 249} ),
				Color( "Black" ),
				Thick( 1 )
			)
		)
	)
);
Jim
vladbondarenko0

Community Trekker

Joined:

Jan 14, 2016

Reference line also will work.

Names default to here(1);

 

dt=open("$SAMPLE_DATA\big class.jmp");

 

nMin = col min(dt:height)-col min(dt:height)*0.1;

 

Graph Builder(

       Size( 787, 633 ),

       Variables( X( :weight ), Y( :height ), Group Y( :sex ) ),

       Elements( Points( X, Y, Legend( 7 ) ) ),

       SendToReport(

              Dispatch(

                     {},

                     "height",

                     ScaleBox,

                     {Min( nMin ), Add Ref Line( nMin, "Solid", "Black", "", 2 )}

              )

       )

);