- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
X group -> adjust axis
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?
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 ) ) )
)
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
Which gives you two data tables
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
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
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
Which will give you two independent Y axes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
Which gives you two data tables
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
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
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
Which will give you two independent Y axes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
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?
A possible - but very time consuming - workaround:
manually add reference lines and adjust their width.
source code:
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" ) )}
)
)
);