cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Martin
Level V

Heatmap with Entire Row and Column Selections

I have a 2x3 heatmap that I am able to plot using Graph Builder - no problems.  What I would like to do is have an additional set of cells for the user to select entire rows or entire columns of cells.  It would look something like this:

Martin_0-1644872706915.png

Question: How can I add the additional C1, C2, R1, R2, and R3 cells to the heat map to allow for the selection of the entire row or column of cells (data table rows)?  If I make a custom Map for this data, is there a way to program the script with a Where clause - as in If( R1 chosen, then select all rows of data with R1, else(......))?

 

Thanks

7 REPLIES 7
txnelson
Super User

Re: Heatmap with Entire Row and Column Selections

A script could be written to do what you are looking to have displayed to the user.  However, short of that, the closest built in item I can think of is to use a Data Filter, and set it to just select the data that are chosen.

txnelson_0-1644949090260.png

 

Jim
Martin
Level V

Re: Heatmap with Entire Row and Column Selections

Thanks @txnelson,  I am interested in your thoughts on a scripting solution.  Not looking for code, but how would you implement such a graphic?

 

Martin

txnelson
Super User

Re: Heatmap with Entire Row and Column Selections

Developing the JSL to create a display as you have specified above is not difficult to do if the x and y dimensions are static.  The code becomes more complex if the display has to be a dynamic display.  To do what you want, you will need to move away from Graph Builder and into other display objects provided in JMP. 

Jim
Martin
Level V

Re: Heatmap with Entire Row and Column Selections

Would you just use "rectangles" on a graph background?  If so, are rectangles selectable?

txnelson
Super User

Re: Heatmap with Entire Row and Column Selections

I would not suggest a graphic box, but something like

txnelson_0-1644973142882.png

This is made up of Button Boxes and Text Boxes.  The Button Boxes allow you to have a script behind each one that will allow you to do the selections you want, and the empty button boxes allow the backgrounds to have colors set.

Names Default To Here( 1 );
nw = New Window( "Select",
	Lineup Box( N Col( 3 ),
		Spacer Box( size( 100, 1 ) ),
		cbb1 = Button Box( "C1" ),
		cbb2 = Button Box( "C2" ),
		Button Box( "R1" ),
		rtb11 = Text Box( "      " ),
		rtb21 = Text Box( "      " ),
		Button Box( "R2" ),
		rtb12 = Text Box( "      " ),
		rtb22 = Text Box( "      " ),
		Button Box( "R3" ),
		rtb13 = Text Box( "      " ),
		rtb23 = Text Box( "      " )
	)
);

rtb11 << background color( "red" );
rtb21 << background color( "green" );
rtb12 << background color( "light red" );
rtb22 << background color( "light green" );
rtb13 << background color( "dark red" );
rtb23 << background color( "dark green" );
Jim
Martin
Level V

Re: Heatmap with Entire Row and Column Selections

@txnelson, that gets pretty close, but I also need the ability to select the individual "color" boxes (text boxes in your example).

 

Is there an easy way to determine which JMP tools are scriptable?

txnelson
Super User

Re: Heatmap with Entire Row and Column Selections

The Scripting Guide and the Script Index are the pieces of documentation that will give you the best information.  The best approach is to read through the Scripting Guide, to get a flavor for the approaches that can be taken to solve your problems.  Then the Scripting Index will give you the specifics for the different objects, functions and platforms and how to work with them.

Jim