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
Tomer9w
Level II

How to edit panel box components (lables)

Hi

In a script I wrote, I'm using a panel box showing two X-axis options which are long strings.

Is there an efficient way to change the display name for more convenience?

Code below is an example.

X_list hold all string representing column names I wish to present to the X axis.

Then, using panelbox to show user options.

Finally, plotting bivariate of user's choice.

 

I asked for help regarding X axis label, but it is best to get tips for y-axis labels too.

 

Thanks!

 

x_list = {"item1","item2"};

panelbox("x-axis", xRadio = radio box(x_list,updatePlot()));

Bivariate( Y( y_list[yRadio<<get] ),  
		X( x_list[xRadio<<get] ), ...)


1 REPLY 1
pmroz
Super User

Re: How to edit panel box components (lables)

Here's an approach that will give you some ideas.

dt = open("$sample_data\Car Physical Data.jmp");

x_list = dt << get column names(numeric, "string");
y_list = x_list;

updateplot = expr(
	dt << Bivariate( Y( eval(ycol) ), X( eval(xcol) ));
);

nw = new window("Choose",
	panelbox("x-axis", 
		xRadio = radio box(x_list, 
			xcol = x_list[xradio << get];
			ycol = y_list[yradio << get];
			updateplot;),
	),
	panelbox("y-axis", 
		yRadio = radio box(y_list,  
			xcol = x_list[xradio << get];
			ycol = y_list[yradio << get];
			updateplot;),
	),
	button box("OK", nw << close window),
);