cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to move from signal modeling to system modeling at the first JMP Aerospace Analytics webinar. Register. June 18, 1 p.m. US Eastern Time.

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?

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 )
				)
			)}
		)
	)
);

 

 

2 REPLIES 2
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" )
		)
	)
);
hogi
Level XIII

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

no workaround needed anymore
once Graph Builder [supports] Overlay by multiple columns 

Recommended Articles