cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
hogi
Level XIII

Why is it not possible to generate this graph in JMP?

wish from 2019: Graph Builder - Overlay by multiple columns 

x axis: (first) Family Car
top graph: % of factor by sex
bottom graph: % of factor by age

hogi_0-1765268287557.png

Semiconductor Industry:
car = Lot
age = classification 1
sex= classification 2



The closest I can get without changing the data table:

hogi_1-1765268416804.png

 


Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
dt << New Column( "First Family Car",
	Character,
	Formula( Word( 1, :family cars, "," ) )
);
Graph Builder(
	Transform Column( "dummy", Formula( 1 ) ),
	Size( 665, 541 ),
	Show Y Axis Title( 0 ),
	Variables(
		X( :First Family Car ),
		Y( :dummy ),
		Y( :dummy ),
		Overlay( :age ),
		Color( :sex )
	),
	Elements(
		Position( 1, 1 ),
		Bar(
			X,
			Y,
			Legend( 4 ),
			Bar Style( "Stacked" ),
			Summary Statistic( "% of Factor" )
		)
	),
	Elements(
		Position( 1, 2 ),
		Bar(
			X,
			Y,
			Color( 0 ),
			Legend( 3 ),
			Bar Style( "Stacked" ),
			Summary Statistic( "% of Factor" )
		)
	),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				4,
				Properties(
					0,
					{Fill Pattern( "left slant heavy" )},
					Item ID( "F", 1 )
				),
				Properties(
					1,
					{Fill Pattern( "left slant heavy b" )},
					Item ID( "M", 1 )
				)
			)}
		)
	)
);

 

 

1 REPLY 1
hogi
Level XIII

Re: Why is it not possible to generate this graph in JMP?

workaround: stack +  Y Group

hogi_0-1765269431490.png

 

Data Table( "Big Class Families" ) << Stack(
	columns( :age, :sex )
);
Graph Builder(
	Variables( X( :First Family Car ), Group Y( :Label ), Overlay( :Data ) ),
	Elements(
		Bar(
			X,Bar Style( "Stacked" ),
			Summary Statistic( "% of Factor" )
		)
	)
);

Recommended Articles