cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

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

How to add an interactive Color by Column selection to Graph Builder?

I have a script (in JMP 16.2) that creates a Graph Builder with a column switcher, and I want to add a feature to allow selecting (interactively or up front) a column (or columns) by which to color the points. I've searched and not found an example.

2 REPLIES 2
tim_reeves
Level III

Re: How to add an interactive Color by Column selection to Graph Builder?

 I should add that I have well over 100 columns and I want to choose the columns to color by from a small subset

ian_jmp
Level X

Re: How to add an interactive Color by Column selection to Graph Builder?

Not quite sure what you have in mind, but this may get you started:

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

nw = NewWindow("Color",
		clb = ColListBox(all, << ModelingType({"Nominal", "Ordinal"}), maxSelected(1)),
		LineUpBox(NCol(2),
			ButtonBox("OK", OKscript),
			ButtonBox("Cancel", nw << closeWindow)
		);
);

OKscript =
Expr(

nw << closeWindow;
colorCol = clb << getSelected;

gb = dt << Graph Builder(
					Show Control Panel( 0 ),
					Variables( Y( :height ), Color( Eval(colorCol)) ),
					Elements( Points( Y, Legend( 7 ) ) ),
					Column Switcher( :height, {:height, :weight} )
				);

	);

Recommended Articles