cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

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

JSL coding debug - help needed with "Label"

Hello,

 

In my JSL code, I am using 

dtt<<Set Label Columns (:skew);

and I can see in the table that label icon is being added next to skew. Then I am using graph builder and within that routine, I have 

Show labels(1),

But when plots are being generated, it is not showing Label. Can you please help on this? Do I need to add anything else?

 

Thanks much

17 REPLIES 17
hasanurkhan
Level II

Re: JSL coding debug - help needed with "Label"

Did you use the code as-is or you changed something? 

jthi
Super User

Re: JSL coding debug - help needed with "Label"

Names Default To Here(1);

dtt = Open("$DOWNLOADS/output_sorted_test.jmp");
dtt << Set Label Columns(:skew);

Summarize(dtt, byGroup0 = by(:layout));
Summarize(dtt, byGroup1 = by(:Label));
Summarize(dtt, byGroup2 = by(:Vt_flavor));
Summarize(dtt, byGroup3 = by(:Z_width));

nn = 1;
ii = 1;
jj = 1;
kk = 1;

dtt << select where(:Label == byGroup1[ii] & :Vt_flavor == byGroup2[jj] & :Z_width == byGroup3[kk] & :layout == byGroup0[nn]);
sel = dtt << get selected rows;

If(N Rows(sel) > 0, 
	dt = dtt << subset(selected rows(1), selected columns(0));

	gb = dt << Graph Builder(
		Size(266, 228),
		Show Control Panel(0),
		Variables(X(:nmos), Y(:pmos), Overlay(:PDK)),
		Elements(Points(X, Y, legend(5), Label("Label by Row"))),
		Show labels(1),
		SendToReport(
			Dispatch({}, "nmos", ScaleBox, {Label Row({Show Major Grid(1), Show Minor Labels(1), Show Minor Grid(1)})}),
			Dispatch({}, "pmos", ScaleBox, {Label Row({Show Major Grid(1), Show Minor Labels(1), Show Minor Grid(1)})}), 
			Dispatch({}, "Graph Builder", FrameBox,
				{Marker Size(6), Add Graphics Script(
					6,
					Description(""),
					Summarize(dt, byGroup = by(:PDK));
					colorList = {"Blue", "red", "Green", "Green"};
					Fill Pattern([0]);
					For(i = 1, i <= N Items(byGroup), i++,
						Pen Color(colorList[i]);
						theRows = dt << get rows where(
							:PDK == byGroup[i] & :skew != "tttt" & :skew != "ff" & :skew != "fs" & :skew != "sf" & :skew != "ss"
						);
						If(Word(2, byGroup[i], "/") == "a",
							Line Style("Dashed"),
						);
						theRows = theRows |/ theRows[1];
						xMatrix = :nmos[theRows];
						yMatrix = :pmos[theRows];
						Line(xMatrix, yMatrix);
					);
				), Add Text Annotation(
					Text(byGroup1[ii] || "_" || "Z" || byGroup3[kk] || "_" || bygroup2[jj] || "_" || bygroup0[nn]),
					Background Color("White"), 
					Filled(0),
					Font("Segoe UI", 14, "Plain")
				)}
			)			
		)
	);
);

Write();
-Jarmo
hasanurkhan
Level II

Re: JSL coding debug - help needed with "Label"

This is very strange. I tried with one plot. Somehow it does not show the label. I also tried copying your code and ran - it does not show the label.  Below is what I get from a single plot and as you can see somehow the Label by row does not show up (as expected). I added in back, re-ran the script, it is same - no label.

Graph Builder(
	Size( 1430, 909 ),
	Show Control Panel( 0 ),
	Variables( X( :nmos ), Y( :pmos ), Overlay( :PDK ) ),
	Elements( Points( X, Y, Legend( 5 ) ) ),
	SendToReport(
		Dispatch( {}, "nmos", ScaleBox,
			{Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 ), Show Minor Labels( 1 )} )}
		),
		Dispatch( {}, "pmos", ScaleBox,
			{Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 ), Show Minor Labels( 1 )} )}
		),
		Dispatch( {}, "Graph Builder", FrameBox,
			{Marker Size( 6 ), Marker Drawing Mode( "Normal" ),
			Add Graphics Script(
				5,
				Description( "" ),
				Summarize( dt, byGroup = by( :PDK ) );
				colorList = {"Blue", "red", "Green", "Green"};
				Fill Pattern( [0] );
				For( i = 1, i <= N Items( byGroup ), i++,
					Pen Color( colorList[i] );
					theRows = dt << get rows where(
						:PDK == byGroup[i] & :skew != "tttt" & :skew != "ff" & :skew != "fs" & :skew != "sf" &
						:skew != "ss"
					);
					If( Word( 2, byGroup[i], "/" ) == "a",
						Line Style( "Dashed" )
					);
					theRows = theRows |/ theRows[1];
					xMatrix = :nmos[theRows];
					yMatrix = :pmos[theRows];
					Line( xMatrix, yMatrix );
				);
			), Add Text Annotation(
				Text( "cgate_per_um_Z120_dev1_s9999019999d9999019999" ),
				Fixed Size( 0 ),
				Text Box( {87, 62, 341, 134} ),
				Background Color( "White" ),
				Font( "Segoe UI", 14, "Plain" ),
				Filled( 0 )
			)}
		)
	)
)
Note: JSL copied into JSL object to assist in easier reading by TXNELSON
 
jthi
Super User

Re: JSL coding debug - help needed with "Label"

The script you pasted isn't the same as my script as I have 

		Elements(Points(X, Y, legend(5), Label("Label by Row"))),
		Show labels(1),

which you do not

-Jarmo
hasanurkhan
Level II

Re: JSL coding debug - help needed with "Label"

I tried that (snippet below). It still does not put Label in the graph. No clue what is wrong. Thanks

 

hasanurkhan_0-1764611256831.png

 

jthi
Super User

Re: JSL coding debug - help needed with "Label"

To be honest, neither do I have any idea what is wrong. If I run the script I provided you with (with slight window resizing) I get this with JMP18

jthi_0-1764612179647.png

And this with JMP19

jthi_1-1764612216195.png

 

-Jarmo
hasanurkhan
Level II

Re: JSL coding debug - help needed with "Label"

Let me update the JMP version and see if that helps. Thanks much.

hasanurkhan
Level II

Re: JSL coding debug - help needed with "Label"

Also I am generating hundreds of plot, so activating by clicks will not work for my purpose. Thanks

Recommended Articles