cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Heart_To_Tell
Level II

Lineup Box Skip row

I'm trying to skip a row of charts within the Lineup Box. For instance, instead of a 4x4 grid, I want 4 charts on the first row, 3 charts on the 2nd row, etc. Is there a way to skip a row or add a line break within the Lineup box?

 

dt = current data table();
//where dtLookup is the data table containing a list of X and Y columns to plot from dt

nw = New Window( "Outputs", lub = Lineup Box( N Col( 4 ) ) );

For Each Row(dtLookup,
	lub << append(
		dt << 
		Graph Builder(
			Size( 500, 350 ),
			Show Control Panel( 0 ),
			Show Legend( 0 ),
			Variables( X( As Column( dt, col_name_X ) ), Y( As Column( dt, col_name_Y)  )),
			Elements( Points( X, Y, Legend( 5 ) ) )
		));

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Lineup Box Skip row

If you know how you want to build the Lineup Boxes with specific column count you could maybe append the lineup box before appending new graphs.

 

This will break most likely fairly easily as it wants you to have exactly 10 (1+2+3+4) values in dtlookup (using list instead of datatable here). 

 

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

dtlookup = {"NPN1", "PNP1","PNP2","NPN2","PNP3","IVP1","PNP4","NPN3","IVP2","NPN4"};

lub_idx = 4;
ongoing_gb = lub_idx;

nw = New Window("Outputs", vlb = V List Box(lub = Lineup Box(N Col(lub_idx))));
For(i = 1, i <= N items(dtlookup), i++,
	If(ongoing_gb > 0,
		lub << append(
			dt << Graph Builder(
				Size(200, 150),
				Show Control Panel(0),
				Show Legend(0),
				Variables(X(As Column(dt, dtlookup[i])), Y(As Column(dt, "lot_id"))),
				Elements(Points(X, Y, Legend(5)))
			)
		);
		ongoing_gb--;
		,
		lub_idx = lub_idx - 1;
		ongoing_gb = lub_idx;
		vlb << Append(lub = Lineup Box(N Col(lub_idx)));
	)
);

jthi_0-1639548294600.png

 

Or optionally you could use V List Box() and H List Box() and checking of indices.

 

-Jarmo

View solution in original post

3 REPLIES 3
Thierry_S
Super User

Re: Lineup Box Skip row

Hi,

I am not aware of a "Skip" function for the Lineup Box but there is a workaround that will need a bit of programming involving the insertion of Spacer Boxes (of the same size as your plot) for each slot you want to skip.

However, it gets a bit tricky because you need to skip 0 slots for the first row, 1 slot for the second row, and 2 slots for the third row; you do not need to skip any slot for the last row.

Apologies for the incomplete answer: I don't have the time to work on your script but you might be able to figure it out.

Best,

TS

 

Thierry R. Sornasse
jthi
Super User

Re: Lineup Box Skip row

If you know how you want to build the Lineup Boxes with specific column count you could maybe append the lineup box before appending new graphs.

 

This will break most likely fairly easily as it wants you to have exactly 10 (1+2+3+4) values in dtlookup (using list instead of datatable here). 

 

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

dtlookup = {"NPN1", "PNP1","PNP2","NPN2","PNP3","IVP1","PNP4","NPN3","IVP2","NPN4"};

lub_idx = 4;
ongoing_gb = lub_idx;

nw = New Window("Outputs", vlb = V List Box(lub = Lineup Box(N Col(lub_idx))));
For(i = 1, i <= N items(dtlookup), i++,
	If(ongoing_gb > 0,
		lub << append(
			dt << Graph Builder(
				Size(200, 150),
				Show Control Panel(0),
				Show Legend(0),
				Variables(X(As Column(dt, dtlookup[i])), Y(As Column(dt, "lot_id"))),
				Elements(Points(X, Y, Legend(5)))
			)
		);
		ongoing_gb--;
		,
		lub_idx = lub_idx - 1;
		ongoing_gb = lub_idx;
		vlb << Append(lub = Lineup Box(N Col(lub_idx)));
	)
);

jthi_0-1639548294600.png

 

Or optionally you could use V List Box() and H List Box() and checking of indices.

 

-Jarmo
Heart_To_Tell
Level II

Re: Lineup Box Skip row

Thank you so much. I ended up using your vlb addition to insert a "page break" based on parsed data from within the column name!

 

Thank you once again!

 

	col_name_Y  = Column(dtLookup, "Y")[i];
	col_name_X   = Column(dtLookup, "X")[i];
	col_name_X_next = Column(dtLookup, "X")[i+1];
// col_name_X format = XXX YYY_ZZZ. The following word commands extracts YYY. rail= Word(1,Word(2,col_name_X," "),"_"); rail_next = Word(1,Word(2,col_name_X_next," "),"_"); if(rail!=rail_next,page_break =1,page_break=0); If(page_break == 0, lub << append( dt << Graph Builder( Size(500, 350), Show Control Panel(0), Show Legend(0), Variables( X( As Column( dt, col_name_X ) ), Y( As Column( dt, col_name_Y) )), Elements(Points(X, Y, Legend(5))) ) ); , lub << append( dt << Graph Builder( Size(500, 350), Show Control Panel(0), Show Legend(0), Variables( X( As Column( dt, col_name_X ) ), Y( As Column( dt, col_name_Y) )), Elements(Points(X, Y, Legend(5))) ) ); vlb << Append(lub = Lineup Box(N Col(lub_idx))); )