cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use JMP Live to centralize and share reports within groups. Webinar with Q&A April 4, 2pm ET.
Choose Language Hide Translation Bar
View Original Published Thread

X group -> adjust axis

hogi
Level XII

Hi,

the axes of subgroups of a plot with a column selected as X group are the same.

In the example below (by default)  all male and female names are on the left AND  on the right.

is there a way to cut the connection between the axes and just show the values that actually belong to the subgroup?

 

HolgerSp_0-1662650930968.png

 

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

Graph Builder(
	Size( 844, 390 ),
	Show Control Panel( 0 ),
	Graph Spacing( 5 ),
	Variables( X( :name ), Y( :height ), Group X( :sex ) ),
	Elements( Points( X, Y, Legend( 11 ) ) )
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User


Re: X group -> adjust axis

Select the Name and the Height columns in the data table

Go to

     Tables=>Subset

Subset the data by column Sex

txnelson_0-1662653328322.png

Which gives you two data tables

txnelson_1-1662653378584.png

Change the name of the columns to nameF and heightF in the female table, and nameM and heightM in the male table

Now concatenate the tables

     Tables=>Concatenate

txnelson_2-1662653516220.png

txnelson_3-1662653645673.png

Go into Graph Builder

Drag the nameF column to the X axis

Drag the nameM column to the right of the nameF on the X axis

Drag both heightF and heightM columns to the Y axis

txnelson_4-1662653822416.png

You can also enhance this display, by creating a right side axis for the Males

Right click on the Y axis, and select Move Right=>heightM

txnelson_0-1662654172534.png

Which will give you two independent Y axes

txnelson_1-1662654236830.png

 

 

 

Jim

View solution in original post

4 REPLIES 4
jthi
Super User


Re: X group -> adjust axis

I think this isn't currently possible and you would have to create separate graphs with different Where filters. These are at least partially related to this How to insert X axis break in graph builder? and wish list item generated from that Add easily configurable axis breaks to the Graph Builder 

-Jarmo
txnelson
Super User


Re: X group -> adjust axis

Select the Name and the Height columns in the data table

Go to

     Tables=>Subset

Subset the data by column Sex

txnelson_0-1662653328322.png

Which gives you two data tables

txnelson_1-1662653378584.png

Change the name of the columns to nameF and heightF in the female table, and nameM and heightM in the male table

Now concatenate the tables

     Tables=>Concatenate

txnelson_2-1662653516220.png

txnelson_3-1662653645673.png

Go into Graph Builder

Drag the nameF column to the X axis

Drag the nameM column to the right of the nameF on the X axis

Drag both heightF and heightM columns to the Y axis

txnelson_4-1662653822416.png

You can also enhance this display, by creating a right side axis for the Males

Right click on the Y axis, and select Move Right=>heightM

txnelson_0-1662654172534.png

Which will give you two independent Y axes

txnelson_1-1662654236830.png

 

 

 

Jim
hogi
Level XII


Re: X group -> adjust axis

Many thanks for the workaround.

 

I have this problem quite often. It's surprising that there is no easier solution (yet).
-> I hope that the team from jmp can add an option to use separate entries on the different axes.
If anybody else is also interested ...
I just sent my wish:

X group: restrict the values on the axis to the respective group 

 

hogi
Level XII


Re: X group -> adjust axis

I really hope, that in a future version there will be an option to shrink the information on the X Axis to the values that are needed for the respective plots.

 

For 2 or 3 main groups, the approach of @txnelson works. But if there are more main groups, the table gets wider and wieder.

 

I agree to @SamGardner - then one should nest the data on the X axis.

https://community.jmp.com/t5/JMP-Wish-List/X-group-restrict-the-values-on-the-axis-to-the-respective... 

A big disadvantage of Nesting on the X Axis compared to X Group:

the separation of the main groups is much worse to see.

 

At the moment, nesting on the X axis is the only practical solution - so,  is there a possibility to optimize the separation?

Changing the grid to black helps, but the lines are still too thin to get the information about the main groups at a glance.

my question:
Can one adjust the line width of the (main) Grid?

 

hogi_1-1676456139705.png

 

A possible - but very time consuming - workaround:
manually add reference lines and adjust their width.

hogi_0-1676456694158.png

 

source code:

View more...
dt = Open( "$SAMPLE_STIPS/Wafer Stacked Small.jmp" );

dt  << Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :Lot ), X( :Lot_Wafer Label, Position( 1 ) ), Y( :Defects ) ),
	Elements( Points( X( 1 ), X( 2 ), Y, Legend( 17 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Lot",
			ScaleBox,
			{Add Ref Line( 5.5, "Solid", "Black", "", 3 ),
			Add Ref Line( 11.5, "Solid", "Black", "", 3 ),
			Add Ref Line( 17.4, "Solid", "Black", "", 3 ),
			Add Ref Line( 23.5, "Solid", "Black", "", 3 ),
			Label Row( 2, Major Grid Line Color( "Black" ) )}
		)
	)
);