cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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),
);

Recommended Articles