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
OneNorthJMP
Level V

Graph Builder with Local Data Filter to Journal

I try to append a graph builder graph with local data filter into Journal. It look fine on JMP when i run the JSL. But when i export to pdf, the local data filter features is gone. Can anyone advice what wrong? According to Bryon feedback, local data filter features is not present on PDF, but the filter still present with notes at below chart. 

 

Another issue that i have is i generate 2 charts with data filter and send it to journal. But the first chart with data filter display correctly with filter fuction. But 2nd chart data filter is not present.

 

Correct charts that i expected inside PDF. 

GBwithLocalFilter.PNG

I attached my JSL, sample and pdf that generated. 

 

Names Default To Here( 1 );
Clear Symbols();
Clear Log();
Close All( Data Tables, NoSave );
Close All( Journals, NoSave );

//Journal
nw = New Window( "Reports",
	<<Journal,
	hlb = H List Box(
		lub = Lineup Box( N Col( 1 ) )
	)
);

//*************************************
//dt_source = Data Table( "Wafer_Sort" );
dt_source = Open( "test.jmp" );

cht_uNV_EC_RD_Set_AfterCyc = dt_source << Graph Builder(
	Size( 1029, 643 ),
	Show Control Panel( 0 ),
	Variables(
		X( :SplitGrp ),
		X( :Wafer, Position( 1 ) ),
		Y( :Name( "DL_uNV_EC_RD_Set_AfterCyc-DL_uNV_EC_RD_Set_AfterCyc,11510,-" ) )
	),
	Elements( Points( X( 1 ), X( 2 ), Y, Legend( 32 ) ) ),
	Local Data Filter(
		Add Filter(
			columns(
				:Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ),
				:Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ),
				:Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ),
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-" ),
				:Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" )
			),
			Where(
				:Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ) == 0
			),
			Where(
				:Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ) == 0
			),
			Where(
				:Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ) == 0
			),
			Where(
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-" ) == 0
			),
			Where(
				:Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" ) == 0 
			)
		)
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {32, [-1]} ), Position( {-1} )}
		)
	)
);

cht_uNV_EC_RD_Erase_AfterCyc = dt_source << Graph Builder(
	Size( 1029, 643 ),
	Show Control Panel( 0 ),
	Variables(
		X( :SplitGrp ),
		X( :Wafer, Position( 1 ) ),
		Y(
			:Name(
				"DL_uNV_EC_RD_Erase_AfterCyc-DL_uNV_EC_RD_Erase_AfterCyc,11512,-"
			)
		)
	),
	Elements( Points( X( 1 ), X( 2 ), Y, Legend( 32 ) ) ),
	Local Data Filter(
		Add Filter(
			columns(
				:Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ),
				:Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ),
				:Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ),
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-"
				),
				:Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" )
			),
			Where(
				:Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ) == 0
			),
			Where(
				:Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" )
				 == 0
			),
			Where(
				:Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ) ==
				0
			),
			Where(
				:Name(
					"DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-"
				) == 0
			),
			Where( :Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" ) == 0 )
		)
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {32, [-1]} ), Position( {-1} )}
		)
	)
);


lub << Append( tb = Text Box( "uNV RD_Set & RD_Erase after 10k" ));
tb << Set Font Size( 14 ) << Set Font Style( "Bold" ) << Justify Text( "center" );
tb << set width(700) << set wrap(700);
lub << Append(Report (cht_uNV_EC_RD_Set_AfterCyc));
lub << Append(Report (cht_uNV_EC_RD_Erase_AfterCyc));


//**** Report *******

Reports = Current Journal();
//Reports << Set page setup( margins( 0.1, 0.1, 0.1, 0.1 ), scale( 0.8 ), portrait( 0 ), paper size( "A4" ) );
Reports << Set page setup( margins( 0.05, 0.05, 0.05, 0.05 ), scale( 1 ), portrait( 0 ), paper size( "A3" ) );

Reports << get page setup();
Reports << SavePDF("debug.pdf");

//Close All( Data Tables, NoSave );
Close All( Journals, NoSave );
//Exit();

 

1 ACCEPTED SOLUTION

Accepted Solutions
Byron_JMP
Staff

Re: Graph Builder with Local Data Filter to Journal

I'm not sure. When I ran your script with the test table. Both graphs are the same, and both can be exported to PDF. In all 4 (?) cases the local data filter is included with the figures.

 

I messed around with your script a little.

I wrapped the two graphs and the filters in an expression.

When I make the window, I put them directly into the window vlistbox (Lub) by evaluating the expressions there.

 

Then I prepended (opposite of append, kind of) the text to the top.

After the window was complete I journaled it as the last step.  Journals can be a pain to work with so I always try to journal last. Saved the journal as a PDF and then opened it to check to see how it looked. 

 

//*************************************
//dt_source = Data Table( "Wafer_Sort" );
dt_source = Open( "test.jmp" );

set = Expr(
	cht_uNV_EC_RD_Set_AfterCyc = dt_source << Graph Builder(
		Size( 1029, 643 ),
		Show Control Panel( 0 ),
		Variables(
			X( :SplitGrp ),
			X( :Wafer, Position( 1 ) ),
			Y( :Name( "DL_uNV_EC_RD_Set_AfterCyc-DL_uNV_EC_RD_Set_AfterCyc,11510,-" ) )
		),
		Elements( Points( X( 1 ), X( 2 ), Y, Legend( 32 ) ) ), 
	
	
		SendToReport(
			Dispatch(
				{},
				"400",
				LegendBox,
				{Legend Position( {32, [-1]} ), Position( {-1} )}
			)
		)
	)
);

erase = Expr(
	cht_uNV_EC_RD_Erase_AfterCyc = dt_source << Graph Builder(
		Size( 1029, 643 ),
		Show Control Panel( 0 ),
		Variables(
			X( :SplitGrp ),
			X( :Wafer, Position( 1 ) ),
			Y( :Name( "DL_uNV_EC_RD_Erase_AfterCyc-DL_uNV_EC_RD_Erase_AfterCyc,11512,-" ) )
		),
		Elements( Points( X( 1 ), X( 2 ), Y, Legend( 32 ) ) ), 
	
		SendToReport(
			Dispatch(
				{},
				"400",
				LegendBox,
				{Legend Position( {32, [-1]} ), Position( {-1} )}
			)
		)
	)
);

filters = Expr(
	cht_uNV_EC_RD_Set_AfterCyc << Local Data Filter(
		Add Filter(
			columns(
				:Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ),
				:Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ),
				:Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ),
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-" ),
				:Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" )
			),
			Where( :Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ) == 0 ),
			Where( :Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ) == 0 ),
			Where( :Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ) == 0 ),
			Where(
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-" ) == 0
			),
			Where( :Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" ) == 0 )
		)
	);
	cht_uNV_EC_RD_Erase_AfterCyc << Local Data Filter(
		Add Filter(
			columns(
				:Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ),
				:Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ),
				:Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ),
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-" ),
				:Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" )
			),
			Where( :Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ) == 0 ),
			Where( :Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ) == 0 ),
			Where( :Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ) == 0 ),
			Where(
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-" ) == 0
			),
			Where( :Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" ) == 0 )
		)
	);
);

nw = New Window( "Reports",
	hlb = H List Box(
		lub = vlist Box( set,erase )
	)
);
filters;

lub << prepend( tb = Text Box( "uNV RD_Set & RD_Erase after 10k
" ));
tb << Set Font Size( 14 ) << Set Font Style( "Bold" ) << Justify Text( "center" );
tb << set width(700) << set wrap(700);
nw<<journal;


//**** Report *******

Reports = Current Journal();
//Reports << Set page setup( margins( 0.1, 0.1, 0.1, 0.1 ), scale( 0.8 ), portrait( 0 ), paper size( "A4" ) );
Reports << Set page setup( margins( 0.05, 0.05, 0.05, 0.05 ), scale( 1 ), portrait( 0 ), paper size( "A3" ) );

Reports << get page setup();
Reports << SavePDF("debug.pdf");
open ("debug.pdf");
//Close All( Data Tables, NoSave );
Close All( Journals, NoSave );
//Exit();

 

Screen Shot 2020-10-27 at 11.53.59 PM.png

 

JMP Systems Engineer, Health and Life Sciences (Pharma)

View solution in original post

8 REPLIES 8
Byron_JMP
Staff

Re: Graph Builder with Local Data Filter to Journal

the local data filters aren't active in the PDF view, so the conditions for the filter selection are reported below the graph.  

 

if you want the local data filter displayed, just save the report to PDF without sending it to a Journal.

 

Also, export to PDF may work differently on a Mac, or in version 15.2  where this is working for me.

 

 

JMP Systems Engineer, Health and Life Sciences (Pharma)
OneNorthJMP
Level V

Re: Graph Builder with Local Data Filter to Journal

Hi Byron,

I am using JMP 14.2 version on window 10. From the pdf, i output 2 chart. The first chart indeed actually display correct filter selection below the graph. But the 2nd chart i am doing the same things. but the data filter is not present. So, what wrong with my 2nd chart display?
Byron_JMP
Staff

Re: Graph Builder with Local Data Filter to Journal

I'm not sure. When I ran your script with the test table. Both graphs are the same, and both can be exported to PDF. In all 4 (?) cases the local data filter is included with the figures.

 

I messed around with your script a little.

I wrapped the two graphs and the filters in an expression.

When I make the window, I put them directly into the window vlistbox (Lub) by evaluating the expressions there.

 

Then I prepended (opposite of append, kind of) the text to the top.

After the window was complete I journaled it as the last step.  Journals can be a pain to work with so I always try to journal last. Saved the journal as a PDF and then opened it to check to see how it looked. 

 

//*************************************
//dt_source = Data Table( "Wafer_Sort" );
dt_source = Open( "test.jmp" );

set = Expr(
	cht_uNV_EC_RD_Set_AfterCyc = dt_source << Graph Builder(
		Size( 1029, 643 ),
		Show Control Panel( 0 ),
		Variables(
			X( :SplitGrp ),
			X( :Wafer, Position( 1 ) ),
			Y( :Name( "DL_uNV_EC_RD_Set_AfterCyc-DL_uNV_EC_RD_Set_AfterCyc,11510,-" ) )
		),
		Elements( Points( X( 1 ), X( 2 ), Y, Legend( 32 ) ) ), 
	
	
		SendToReport(
			Dispatch(
				{},
				"400",
				LegendBox,
				{Legend Position( {32, [-1]} ), Position( {-1} )}
			)
		)
	)
);

erase = Expr(
	cht_uNV_EC_RD_Erase_AfterCyc = dt_source << Graph Builder(
		Size( 1029, 643 ),
		Show Control Panel( 0 ),
		Variables(
			X( :SplitGrp ),
			X( :Wafer, Position( 1 ) ),
			Y( :Name( "DL_uNV_EC_RD_Erase_AfterCyc-DL_uNV_EC_RD_Erase_AfterCyc,11512,-" ) )
		),
		Elements( Points( X( 1 ), X( 2 ), Y, Legend( 32 ) ) ), 
	
		SendToReport(
			Dispatch(
				{},
				"400",
				LegendBox,
				{Legend Position( {32, [-1]} ), Position( {-1} )}
			)
		)
	)
);

filters = Expr(
	cht_uNV_EC_RD_Set_AfterCyc << Local Data Filter(
		Add Filter(
			columns(
				:Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ),
				:Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ),
				:Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ),
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-" ),
				:Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" )
			),
			Where( :Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ) == 0 ),
			Where( :Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ) == 0 ),
			Where( :Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ) == 0 ),
			Where(
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-" ) == 0
			),
			Where( :Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" ) == 0 )
		)
	);
	cht_uNV_EC_RD_Erase_AfterCyc << Local Data Filter(
		Add Filter(
			columns(
				:Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ),
				:Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ),
				:Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ),
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-" ),
				:Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" )
			),
			Where( :Name( "DL_uNV_EC_Set_PreCyc-DL_uNV_EC_Set_PreCyc,11504,-" ) == 0 ),
			Where( :Name( "DL_uNV_EC_RD_Set_PreCyc-DL_uNV_EC_RD_Set_PreCyc,11505,-" ) == 0 ),
			Where( :Name( "DL_uNV_EC_Erase_PreCyc-DL_uNV_EC_Erase_PreCyc,11506,-" ) == 0 ),
			Where(
				:Name( "DL_uNV_EC_RD_Erase_PreCyc-DL_uNV_EC_RD_Erase_PreCyc,11507,-" ) == 0
			),
			Where( :Name( "DL_uNV_EC_10k_Cycle-DL_uNV_EC_10k_Cycle,11508,-" ) == 0 )
		)
	);
);

nw = New Window( "Reports",
	hlb = H List Box(
		lub = vlist Box( set,erase )
	)
);
filters;

lub << prepend( tb = Text Box( "uNV RD_Set & RD_Erase after 10k
" ));
tb << Set Font Size( 14 ) << Set Font Style( "Bold" ) << Justify Text( "center" );
tb << set width(700) << set wrap(700);
nw<<journal;


//**** Report *******

Reports = Current Journal();
//Reports << Set page setup( margins( 0.1, 0.1, 0.1, 0.1 ), scale( 0.8 ), portrait( 0 ), paper size( "A4" ) );
Reports << Set page setup( margins( 0.05, 0.05, 0.05, 0.05 ), scale( 1 ), portrait( 0 ), paper size( "A3" ) );

Reports << get page setup();
Reports << SavePDF("debug.pdf");
open ("debug.pdf");
//Close All( Data Tables, NoSave );
Close All( Journals, NoSave );
//Exit();

 

Screen Shot 2020-10-27 at 11.53.59 PM.png

 

JMP Systems Engineer, Health and Life Sciences (Pharma)
OneNorthJMP
Level V

Re: Graph Builder with Local Data Filter to Journal

Hi Bryon,

Thanks for the modified JSL. Seem like the modified JSL work for me. Just not sure why my original JSL not working.
Byron_JMP
Staff

Re: Graph Builder with Local Data Filter to Journal

I don't know why it wasn't working either. It seemed to work for me, but I'm on a Mac, so that could be part of it.

 

The approach I use for the problem you are working on is a little different, and seems to work robustly for a lot of different situations.   First I make the graphs, then I copy the graph script into an expression.

graph1=expr( "paste the graph script here" );

A side benefit of this comes from Code Folding (Go to File>Preferences>Script Editor, and turn this option on). I can fold the entire graph in to one line on the script editor, which is very convenient.

 

After I have all the graphs completed I can generate the window display with a few short lines.

win=new window("Example", vlist box( graph1, graph2);

After the graphs are in the window I can send messages to them for formatting and all that.

In this example "win" is an object that can be journaled, or more simply, just saved to a PDF or Powerpoint.

 

When I'm using JSL, with very few exceptions, I do not use the journal as an intermediate container.  The journal is very convenient as a container for manual operations though. 

 

Glad this helped!

Chers,

Byron

JMP Systems Engineer, Health and Life Sciences (Pharma)
OneNorthJMP
Level V

Re: Graph Builder with Local Data Filter to Journal

Bryon,
Thanks for the great tips. Next time when i do my JSL coding. i will try this method.

Re: Graph Builder with Local Data Filter to Journal

In the original JSL, you use the Report() function when appending the content to the journal.  The Report() function on a platform returns a Display Box that contains the platform Outline and everything inside of it, but does not include the filter or column switchers that are off to the side.

 

In Byron's script, he sends the <<Journal message to the Window, which captures everything that you see.  Another way to do this with your original script would be to use the <<TopReport message on the platform:

 

lub << Append(cht_uNV_EC_RD_Set_AfterCyc << Top Report);
lub << Append(cht_uNV_EC_RD_Erase_AfterCyc << Top Report);
OneNorthJMP
Level V

Re: Graph Builder with Local Data Filter to Journal

Thanks danschikore. I try your script. It did include the local data filter platform into the journal. But the 2nd chart is still not have really doing the data filter function. If it did, i will not see the points on the red circle. 

 

Still not fully understand why 1st chart data filter function is work but 2nd chart data filter function is not working. And beside this, i also not sure why there is one black marking point there. 

 

Capture.PNG