cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
] />

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

JMP Community Question Title: Graph Builder with Local Data Filter producing wrong output in JMP 16 - works in JMP 14

Hi,

I have the following JSL code that creates a Graph Builder plot inside a For loop. It works correctly in JMP 14 but produces wrong output in JMP 16.

JMP 14 Code (works correctly):

gb = Expr(
    dt << Graph Builder(
        Size( 635, 338 ),
        Show Control Panel( 0 ),
        Variables( X( :Time Point Months ), Y( :Result ), Overlay( :Batch ) ),
        Elements(
            Points( X, Y, Legend( 1 ) ),
            Line Of Fit( X, Y, Legend( 2 ), Confidence of Fit( 0 ) )
        ),
        Local Data Filter(
            invisible,
            Add Filter(
                columns( :Component, :Batch, :Source Table ),
                Where( :Component == numPar[i] ),
                Where( :Batch == {cyc, bat}),
                Where( :Source Table == dt_name )
            )
        ),
        SendToReport(
            Dispatch(
                {},
                "Time Point Months",
                ScaleBox,
                {Min( -0.1 ), Max( maxvalts ), Inc( 2 ), Minor Ticks( 1 )}
            ),
            Dispatch(
                {},
                "graph title",
                TextEditBox,
                {Set Text( numPar[i] || " vs. Time Point" )}
            ),
            Dispatch( {},
                "Y title", 
                TextEditBox, 
                {Set Text( yTitleText)}
            ),
            Dispatch(
                {},
                "Result",
                ScaleBox,
                {Format( "Fixed Dec", 10, 3 ), 
                Min( Eval( minval )), 
                Max( Eval( maxval )), 
                Inc( Eval( (maxval - minval) / 10 ))}
            )
        )
    )
);
col1 << Append(gb);


Did the Graph Builder syntax or Local Data Filter behavior change between JMP 14 and JMP 16? How should I rewrite this to work correctly in JMP 16?
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: JMP Community Question Title: Graph Builder with Local Data Filter producing wrong output in JMP 16 - works in JMP 14

You click on the grey triangle to collapse the outline box (make it hide the filters), then you set the title to empty.

From this

jthi_0-1776952382493.png

to this

jthi_1-1776952387522.png

I don't have JMP16 but the script is most likely quite close to this

Graph Builder(
	Size(658, 555),
	Show Control Panel(0),
	Variables(X(:height), Y(:weight)),
	Elements(Points(X, Y, Legend(7)), Smoother(X, Y, Legend(8))),
	Local Data Filter(
		Close Outline(1),
		Title(""),
		Add Filter(
			columns(:name),
			Where(
				:name == {"ALFRED", "ALICE", "AMY", "BARBARA", "CAROL", "CHRIS",
				"CLAY", "DANNY", "DAVID", "EDWARD", "ELIZABETH"}
			),
			Display(
				:name,
				N Items(15),
				Find(Set Text(""), Contains Terms(1), Contains Phrase(0))
			)
		)
	)
);
-Jarmo

View solution in original post

6 REPLIES 6
jthi
Super User

Re: JMP Community Question Title: Graph Builder with Local Data Filter producing wrong output in JMP 16 - works in JMP 14

Create the plot manually in JMP16 and copy the script from graph builder.

-Jarmo

Re: JMP Community Question Title: Graph Builder with Local Data Filter producing wrong output in JMP 16 - works in JMP 14

i plot it mannualy and the script is this one: ( the plot output has been attached as"1") 

Graph Builder(
	Size( 635, 580 ),
	Show Control Panel( 0 ),
	Variables( X( :Time Point Months ), Y( :Result ), Overlay( :Batch ) ),
	Elements(
		Points( X, Y, Legend( 1 ) ),
		Line Of Fit( X, Y, Legend( 2 ), Confidence of Fit( 0 ) )
	),
	Local Data Filter(
		Close Outline( 1 ),
		Add Filter(
			columns( :Component, :Batch, :Source Table ),
			Where( :Component == "Bacterial Endotoxin" ),
			Where( :Source Table == "Subset of Stab_IcoSema_test1_test2_test4" ),
			Display( :Component, N Items( 15 ), Find( Set Text( "" ) ) ),
			Display( :Batch, N Items( 6 ) ),
			Display( :Source Table, N Items( 2 ), "List Display" )
		)
	),
	SendToReport(
		Dispatch(
			{},
			"Time Point Months",
			ScaleBox,
			{Min( -0.1 ), Max( 19.395 ), Inc( 2 ), Minor Ticks( 1 )}
		),
		Dispatch( {}, "Result", ScaleBox, {Format( "Fixed Dec", 10, 3 )} ),
		Dispatch(
			{},
			"graph title",
			TextEditBox,
			{Set Text( "Bacterial Endotoxin vs. Time Point" )}
		),
		Dispatch(
			{},
			"Y title",
			TextEditBox,
			{Set Text( "Content of semaglutide" )}
		)
	)
);



The thing is that i would like to remove completely the local data filter , but when i remove it i have this output : screenshot 2

Re: JMP Community Question Title: Graph Builder with Local Data Filter producing wrong output in JMP 16 - works in JMP 14

so how can i make it invisible? 

 

jthi
Super User

Re: JMP Community Question Title: Graph Builder with Local Data Filter producing wrong output in JMP 16 - works in JMP 14

You would like to hide it completely? You can collapse the outline box and then set the outline box title to "" for example. It should get you quite close

-Jarmo

Re: JMP Community Question Title: Graph Builder with Local Data Filter producing wrong output in JMP 16 - works in JMP 14

how can i collapse it? what do you mean ? 

 

dt << Graph Builder(
						
						Size( 635, 338 ),
						Show Control Panel( 0 ),
						Variables( X( :Time Point Months ), Y( :Result ), Overlay( :Batch ) ),
						Elements(
							Points( X, Y, Legend( 1 ) ),
							Line Of Fit( X, Y, Legend( 2 ), Confidence of Fit( 0 ) )
						),
						Local Data Filter(
							Close Outline( 1 ),
							Add Filter(
								columns( :Component, :Batch, :Source Table ),
								Where( :Component == numPar[i] ),
								Where( :Batch == {cyc, bat}),
								Where( :Source Table == dt_name )
							)
						),
						SendToReport(
							Dispatch(
								{},
								"Time Point Months",
								ScaleBox,
								{Min( -0.1 ), Max( maxvalts ), Inc( 2 ), Minor Ticks( 1 )}
							),
							Dispatch(
								{},
								"graph title",
								TextEditBox,
								
								{Set Text( numPar[i] || " vs. Time Point" )}
							),
							Dispatch( {},
							 "Y title", 
							 TextEditBox, 
							 {Set Text( yTitleText)}
							),
							 Dispatch(
							{},
							"Result",
							ScaleBox,
							{Format( "Fixed Dec", 10, 3 ), Min( Eval( minval )), Max( Eval( maxval )), Inc( Eval( (maxval - minval) / 10 ))},
							)
						)
					)
jthi
Super User

Re: JMP Community Question Title: Graph Builder with Local Data Filter producing wrong output in JMP 16 - works in JMP 14

You click on the grey triangle to collapse the outline box (make it hide the filters), then you set the title to empty.

From this

jthi_0-1776952382493.png

to this

jthi_1-1776952387522.png

I don't have JMP16 but the script is most likely quite close to this

Graph Builder(
	Size(658, 555),
	Show Control Panel(0),
	Variables(X(:height), Y(:weight)),
	Elements(Points(X, Y, Legend(7)), Smoother(X, Y, Legend(8))),
	Local Data Filter(
		Close Outline(1),
		Title(""),
		Add Filter(
			columns(:name),
			Where(
				:name == {"ALFRED", "ALICE", "AMY", "BARBARA", "CAROL", "CHRIS",
				"CLAY", "DANNY", "DAVID", "EDWARD", "ELIZABETH"}
			),
			Display(
				:name,
				N Items(15),
				Find(Set Text(""), Contains Terms(1), Contains Phrase(0))
			)
		)
	)
);
-Jarmo

Recommended Articles