Can the width of the X-axis of the grouped graphics be set separately?For example, after I draw the graph like this, the widths of these two x-axes are set to be different.
Thanks!
dt=Open("$SAMPLE_DATA/Big Class.jmp");
d2=dt<<SUMMARY></SUMMARY>

Automation and ScriptingWindowsRe: Can the width of the X-axis of the grouped graphics be set separately?you can split the height column in two parts:

... and generate 2 adjacent plots:
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Summary(
Group( :age, :sex ),
Sum( :height ),
statistics column name format( "column" )
);
New Column( "height M", Formula( If( :sex == "M", :height ) ));
New Column( "height F", Formula( If( :sex == "F", :height ) ));
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :height F ), X( :height M ), Y( :age ), Color( :N Rows ) ),
Relative Sizes( "X", [360 237] ),
Elements( Position( 1, 1 ), Bar( X, Y ) ),
Elements( Position( 2, 1 ), Bar( X, Y ) ),
SendToReport(
Dispatch( {}, {:height F}, ScaleBox, {Max( 800 )} )
)
);
unfortunately, the color in the plot is unexpected: same color for both sexes ?!
seems that color is taken from rows without values in the column which is used for the response axis.
-> interesting / important finding!

Re: Can the width of the X-axis of the grouped graphics be set separately?Thanks Experts!
Re: Can the width of the X-axis of the grouped graphics be set separately?So, in addition, either split color or the age axis:

Graph Builder(
Transform Column( "age_F", Nominal, Formula( If( :sex == "F", :age ) ) ),
Transform Column( "age_M", Nominal, Formula( If( :sex == "M", :age ) ) ),
Size( 433, 323 ),
Show Control Panel( 0 ),
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables(
X( :height F ),
X( :height M ),
Y( :age_M, Combine( "Merged" ) ),
Y( :age_F, Position( 1 ), Combine( "Merged" ) ),
Color( :N Rows )
),
Relative Sizes( "X", [360 237] ),
Elements( Position( 1, 1 ), Bar( X, Y( 2 )) ),
Elements( Position( 2, 1 ), Bar( X, Y( 1 ) ) ),
SendToReport(
Dispatch( {}, {:height F}, ScaleBox, {Max( 800 ), Inc( 100 ), Minor Ticks( 0 )} )
);
With the ability to scale the x axes independently, you also get the "duty" to meaningful ranges (= same range) for the 2 color scales.
Re: Can the width of the X-axis of the grouped graphics be set separately?A much better way: via page
- independent x axes
- synchronous y axis scale - via Link Page Axes( "Y Only" ),
- synchronous color scale
i hope you don't mind the small gap between the plots

Graph Builder(
Size( 527, 455 ),
Show Control Panel( 0 ),
Link Page Axes( "Y Only" ),
Replicate Linked Page Axes( 0 ),
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables( X( :height ), Y( :age ), Page( :sex, Levels per Row( 2 ) ), Color( :N Rows ) ),
Elements( Bar( X, Y, Legend( 7 ) ) )
);
Re: Can the width of the X-axis of the grouped graphics be set separately?This width is the same.
Re: Can the width of the X-axis of the grouped graphics be set separately?Oh, yes, you are right. The Range can be adjusted individually, but the width is again forced to be the same.
Then I fear you need the lengthy code.
let's see what other users suggest ...
Re: Can the width of the X-axis of the grouped graphics be set separately?Thanks Experts!
I'm using this script.
How can we obtain this subset by following the step of taking a screenshot, by hovering over the graphic or clicking on it?

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Summary(
Group( :age, :sex ),
Sum( :height ),
statistics column name format( "column" )
);
New Column( "height M", Formula( If( :sex == "M", :height ) ));
New Column( "height F", Formula( If( :sex == "F", :height ) ));
Graph Builder(
Transform Column( "age_F", Nominal, Formula( If( :sex == "F", :age ) ) ),
Transform Column( "age_M", Nominal, Formula( If( :sex == "M", :age ) ) ),
Size( 433, 323 ),
Show Control Panel( 0 ),
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables(
X( :height F ),
X( :height M ),
Y( :age_M, Combine( "Merged" ) ),
Y( :age_F, Position( 1 ), Combine( "Merged" ) ),
Color( :N Rows )
),
Relative Sizes( "X", [360 237] ),
Elements( Position( 1, 1 ), Bar( X, Y( 2 )) ),
Elements( Position( 2, 1 ), Bar( X, Y( 1 ) ) ),
SendToReport(
Dispatch( {}, {:height F}, ScaleBox, {Max( 800 ), Inc( 100 ), Minor Ticks( 0 )} )
));Re: Can the width of the X-axis of the grouped graphics be set separately?I tried such code and could only succeed by clicking on the image "F" on the left.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
d1=dt << Summary(
Group( :age, :sex ),
Sum( :height ),
statistics column name format( "column" )
);
New Column( "height M", Formula( If( :sex == "M", :height ) ));
New Column( "height F", Formula( If( :sex == "F", :height ) ));
p2=d1<< Graph Builder(
Transform Column( "age_F", Nominal, Formula( If( :sex == "F", :age ) ) ),
Transform Column( "age_M", Nominal, Formula( If( :sex == "M", :age ) ) ),
Size( 433, 323 ),
Show Control Panel( 0 ),
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables(
X( :height F ),
X( :height M ),
Y( :age_M, Combine( "Merged" ) ),
Y( :age_F, Position( 1 ), Combine( "Merged" ) ),
Color( :N Rows )
),
Relative Sizes( "X", [360 237] ),
Elements( Position( 1, 1 ), Bar( X, Y( 2 )) ),
Elements( Position( 2, 1 ), Bar( X, Y( 1 ) ) ),
SendToReport(
Dispatch( {}, {:height F}, ScaleBox, {Max( 800 ), Inc( 100 ), Minor Ticks( 0 )} )
));
frame=(p2<<REPORT></REPORT>

Thanks Experts!
Re: Can the width of the X-axis of the grouped graphics be set separately?In the image in the post N-2 it seems that you could also click on the bar "M" on the right?
To get a better understanding of the issue, could you add some comments what is possible and what is not?
Which JMP version?
Re: Can the width of the X-axis of the grouped graphics be set separately?After thinking again (about my original post):
I don't recommend to create a graph like this - very dangerous.
I had to use Merged to zip the labels on the Y axis. *)

Otherwise Graph Builder plots it unzipped:

a)
Merge leads to the wrong labels on the Y axis: 1,2,3... instead of 12,13,14 ...
b) It's systematic, but dangerous:
To see the issue, just generate the plot with one missing entry (e.g. NO female, 15 years):

As "Merge" replaces the labels with 1, 2, 3 ... this makes the bars for Female shift and misaligns them to the male bars (!)
the topic is interesting, it illustrates how JMP handles data with missing entries.
By the way - on my system, the default setting is

So, If your graph is empty:

go to the red-triangle-menu and activate the option.
Under the line:
With Include Missing Categories disabled - (and with all the missing values we added!) there is nothing to plot.
(Graph Builder removes the row also from subplots where the column with the missing value is not used).
With Include Missing Categories enabled, Graph Builder treats missing values as a separate level and thereby adds an unwanted split.
To get rid of the split, I used the Merge option, which "ignores" the actual entries and replaces the individual values with their rank. This is dangerous if the same values have different ranks in different subsets.
Re: Can the width of the X-axis of the grouped graphics be set separately?with the two options:
@hogi wrote:
in addition, either split color or the age axis:
better forget the second one - and use the first one:

Graph Builder(
Transform Column( "N_M", Formula( If( :sex == "M", :N Rows ) ) ),
Transform Column( "N_F", Formula( If( :sex == "F", :N Rows ) ) ),
Variables( X( :height F ), X( :height M ), Y( :age ), Color( :N_F ), Color( :N_M ) ),
Relative Sizes( "X", [360 237] ),
Elements( Position( 1, 1 ), Bar( X, Y, Color( 1 ), Legend( 1 ) ) ),
Elements( Position( 2, 1 ), Bar( X, Y, Color( 2 ), Legend( 2 ) ) ),
)
Re: Can the width of the X-axis of the grouped graphics be set separately?dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
d1=dt << Summary(
Group( :age, :sex ),
Sum( :height ),
statistics column name format( "column" )
);
New Column( "height M", Formula( If( :sex == "M", :height ) ));
New Column( "height F", Formula( If( :sex == "F", :height ) ));
p2=d1<< Graph Builder(
Transform Column( "age_F", Nominal, Formula( If( :sex == "F", :age ) ) ),
Transform Column( "age_M", Nominal, Formula( If( :sex == "M", :age ) ) ),
Size( 433, 323 ),
Show Control Panel( 0 ),
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables(
X( :height F ),
X( :height M ),
Y( :age_M, Combine( "Merged" ) ),
Y( :age_F, Position( 1 ), Combine( "Merged" ) ),
Color( :N Rows )
),
Relative Sizes( "X", [360 237] ),
Elements( Position( 1, 1 ), Bar( X, Y( 2 )) ),
Elements( Position( 2, 1 ), Bar( X, Y( 1 ) ) ),
SendToReport(
Dispatch( {}, {:height F}, ScaleBox, {Max( 800 ), Inc( 100 ), Minor Ticks( 0 )} )
));
rpt = p2 << Report;
frames = rpt << XPath( "//FrameBox" );
For( i = 1, i <= N Items( frames ), i++,
frames[i] << Set Graphlet(
Picture(
try(Close(d2,nosave));
current data table(dt);
d2=dt<<SUBSET></SUBSET>Re: Can the width of the X-axis of the grouped graphics be set separately?you prefer the approach via age?
Then perhaps add a check that both subsets contain exactly the same age groups.
Re: Can the width of the X-axis of the grouped graphics be set separately?This is given by AI. It can run, but I still don't know how to get the position of the column number of the graphic I clicked.
Could you please give me a code, expert?Thank you very much!
Re: Can the width of the X-axis of the grouped graphics be set separately?Caption(Char(dt<<GET selected="" rows=""></GET>