cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
hogi
Level XII

Selecting Data points via the axis labels?

In Graph Builder, is there a possibility to select the data points via a (Shift, Alt, Ctrl) click on a label of a categorical/ordinal axis?

i.e. by clicking on "14", all data points corresponding to age=14 get highlighted:

hogi_1-1682600434334.png

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
hogi
Level XII

Re: Selecting Data points via the axis labels?

One could add a heatmap sub-graph to allow the selection.

But is there a direct way, just using the axis labels?

 

hogi_1-1682607155147.png

 

 

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << new column("X",Nominal, set each value(1));

Graph Builder(
	Variables( X( :age ), Y( :weight ), Y( :height ), Y( :X ) ),
	Relative Sizes( "Y", [100 100 15] ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 12 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 13 ) ) ),
	Elements( Position( 1, 3 ), Heatmap( X, Y, Legend( 19 ) ) )
)

 

View solution in original post

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Selecting Data points via the axis labels?

Old topic I know, but I echo @Mark_Bailey's comment about histograms, here is an example:

ih_1-1688410735989.png

JSL to recreate this graph:

View more...
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

Graph Builder(
	Size( 302, 346 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :weight ), Y( :height ), Y( :height ) ),
	Relative Sizes( "Y", [130 197 33] ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 12 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 13 ) ) ),
	Elements( Position( 1, 3 ), Histogram( X, Legend( 22 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"height",
			ScaleBox( 2 ),
			{Label Row( Show Major Labels( 0 ) )}
		),
		Dispatch( {}, "Y 2 title", TextEditBox, {Set Text( "" )} )
	)
);

 

View solution in original post

5 REPLIES 5
hogi
Level XII

Re: Selecting Data points via the axis labels?

One could add a heatmap sub-graph to allow the selection.

But is there a direct way, just using the axis labels?

 

hogi_1-1682607155147.png

 

 

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << new column("X",Nominal, set each value(1));

Graph Builder(
	Variables( X( :age ), Y( :weight ), Y( :height ), Y( :X ) ),
	Relative Sizes( "Y", [100 100 15] ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 12 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 13 ) ) ),
	Elements( Position( 1, 3 ), Heatmap( X, Y, Legend( 19 ) ) )
)

 

Re: Selecting Data points via the axis labels?

I like your heatmap idea better, but here's something that almost works and might help drive the discussion forward. I was thinking that a data filter instead of the axis would work, but I couldn't find a way to get rid of all the controls. 

Jed_Campbell_0-1682614627079.png

 

 

/*JMP STATISTICAL DISCOVERY LLC (“JMP”) PERMITS THE USE OF THIS COMPUTER SOFTWARE CODE (“CODE”) ON AN AS-IS BASIS AND AUTHORIZES YOU TO USE THE CODE SUBJECT TO THE TERMS LISTED HEREIN.  BY USING THE CODE, YOU AGREE TO THESE TERMS.  YOUR USE OF THE CODE IS AT YOUR OWN RISK.  JMP MAKES NO REPRESENTATION OR WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRIGEMENT, AND TITLE, WITH RESPECT TO THE CODE.
You may use the Code solely as part of a software product you currently have licensed from JMP, JMP’s parent company SAS Institute Inc. (“SAS”), or one of JMP’s or SAS’s subsidiaries or authorized agents (the “Software”), and not for any other purpose.  The Code is designed to add functionality to the Software but has not necessarily been tested.  Accordingly, JMP makes no representation or warranty that the Code will operate error-free.  JMP is under no obligation to maintain, support, or continue to distribute the Code.
Neither JMP nor its licensors shall be liable to you or any third-party for any general, special, direct, indirect, consequential, incidental, or other damages whatsoever arising out of or related to your use or inability to use the Code, even if JMP has been advised of the possibility of such damages.  Except as otherwise provided above, the Code is governed by the same agreement that governs the Software.  If you do not have an existing agreement with JMP or SAS governing the Software, you may not use the Code.
JMP and all other JMP Statistical Discovery LLC product or service names are registered trademarks or trademarks of JMP Statistical Discovery LLC in the USA and other countries.  ® indicates USA registration.  Other brand and product names are registered trademarks or trademarks of their respective companies.
*/

dt = open ("$SAMPLE_DATA/Big Class.jmp");
nw = New Window( "Graph",
	V List Box(
		g = Graph Builder(
			Size( 754, 634 ),
			Show Control Panel( 0 ),
			Show Legend( 0 ),
			Show X Axis( 0 ),
			Show X Axis Title( 0 ),
			Variables( X( :age ), Y( :height ), Y( :weight ) ),
			Relative Sizes( "Y", [127 128] ),
			Elements( Position( 1, 1 ), Points( X, Y, Legend( 18 ) ) ),
			Elements( Position( 1, 2 ), Points( X, Y, Legend( 19 ) ) )
		),
		df = dt <<
		Data Filter(
			Location( {2831, 76} ),
			Width( 741 ),
			Add Filter(
				columns( :age ),
				Where( :age == 17 ),
				Display( :age, "Blocks Display" )
			)
		)
	)
);
df << show controls (0);

Re: Selecting Data points via the axis labels?

I often open a Distribution platform on the variables in the plot. I use dynamic linking to select values and define selection subsets. Now I can use the histogram between the column name and data values for the same purpose.

hogi
Level XII

Re: Selecting Data points via the axis labels?

Add-On topic:

If several columns are used as hierarchical X labels, there is an option for each subplot and plot style to use or not use the respective column as part of the hierarchy.


This can be extremely useful:

by deselecting the column which is used as 2nd level on the X axis, Heatmaps will just be separated by the 1st level, like this:

hogi_5-1688044139952.png

 

Unfortunately, deselecting a column doesn't have any effect - the graph looks exactly the same with "X - name" selected and deselected

 

hogi_0-1688043060289.png

hogi_6-1688044188509.png

 

 

Graph Builder(
	Variables(
		X( :age ),
		X( :name, Position( 1 ) ),
		Y( :weight ),
		Y( :X ),
		Color( :age ),
		Frequency( :one )
	),
	Relative Sizes( "Y", [100 15] ),
	Elements( Position( 1, 1 ), Points( X( 1 ), X( 2 ), Y ) ),
	Elements( Position( 1, 2 ), Heatmap( X( 1 ), Y ) )
)

 

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Selecting Data points via the axis labels?

Old topic I know, but I echo @Mark_Bailey's comment about histograms, here is an example:

ih_1-1688410735989.png

JSL to recreate this graph:

View more...
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

Graph Builder(
	Size( 302, 346 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :weight ), Y( :height ), Y( :height ) ),
	Relative Sizes( "Y", [130 197 33] ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 12 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 13 ) ) ),
	Elements( Position( 1, 3 ), Histogram( X, Legend( 22 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"height",
			ScaleBox( 2 ),
			{Label Row( Show Major Labels( 0 ) )}
		),
		Dispatch( {}, "Y 2 title", TextEditBox, {Set Text( "" )} )
	)
);