cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Hanyuri
Level II

How to label multiple columns to every points in Graph builder

Hi buddies,

 

I have created a chart with multiples lines (multiples columns) in graph builder. When I labled values for columns (:sbl_rate; :Test module rate; :fab/sort rate; :assembly rate), instead of each point would be labled corresponding to its value, it showed all row values to each point. Please give me advices.

 

 

charting.JPG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ih
Super User (Alumni) ih
Super User (Alumni)

Re: How to label multiple columns to every points in Graph builder

There might be a way to do this with row labels, but one option (albeit laborious) is to add transparent bars with labels.  This can be done graphically by:

  • Start with your chart
  • Remove all row labels
  • For each value displayed (SBL_rate & 3 more)
    • In top chart, right click, add a bar
    • On bottom left expand 'Variables' and only select one y variable
    • Change bar style to single
    • Set label to value
    • In legend settings change bar transparency to zero
  • Change legend settings to only show the lines and bars on the bottom

labels.png

Names default to here( 1 );

dt1 = Open( "$Sample_data/Big Class.jmp", Invisible );

dt1Tab = dt1 << Tabulate(
	Set Format( N( 9, "Best" ) ),
	Add Table(
		Column Table( Analysis Columns( :height, :weight ) ),
		Column Table( Grouping Columns( :sex ) ),
		Row Table( Grouping Columns( :age ) )
	)
);
	
dt2 = dt1Tab << Make Into Data Table;

dt1Tab << Close Window();

dt1 << Close Window();

dt2 << Graph Builder(
	Size( 929, 449 ),
	Show Control Panel( 0 ),
	Variables(
		X( :age ),
		Y( :Name( "Sum(height)" ) ),
		Y( :Name( "Sum(weight)" ), Position( 1 ) ),
		Y( :M ),
		Y( :F, Position( 2 ) )
	),
	Elements(
		Position( 1, 1 ),
		Line( X, Y( 1 ), Y( 2 ), Legend( 13 ) ),
		Points( X, Y( 1 ), Y( 2 ), Legend( 16 ), Jitter( 0 ) ),
		Bar(
			X,
			Y( 2 ),
			Legend( 19 ),
			Bar Style( "Single" ),
			Label( "Label by Value" )
		),
		Bar(
			X,
			Y( 1 ),
			Legend( 20 ),
			Bar Style( "Single" ),
			Label( "Label by Value" )
		)
	),
	Elements( Position( 1, 2 ), Bar( X, Y( 1 ), Y( 2 ), Legend( 24 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				13,
				Properties( 1, {Line Color( 51 ), Fill Color( 0 )} )
			), Legend Model(
				16,
				Base( 0, 0, 0 ),
				Base( 1, 0, 0 ),
				Properties( 1, {Line Color( 19 ), Fill Color( 0 )} )
			), Legend Model(
				19,
				Properties( 0, {Fill Color( 2 ), Transparency( 0 )} )
			), Legend Model(
				20,
				Properties( 0, {Fill Color( 2 ), Transparency( 0 )} )
			)}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Grid Line Order( 4 ), Reference Line Order( 8 )}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position(
				{13, [0, 1], 16, [-1, -1], 19, [-1], 20, [-1], 24, [2, 3]}
			), Position( {0, 1, -1, -1, -1, -1, 2, 3} )}
		)
	)
);

View solution in original post

3 REPLIES 3
ian_jmp
Level X

Re: How to label multiple columns to every points in Graph builder

I think you want to label only by 'SBL_lot_qty'. But notice that (in the Columns panel of the data dable), you have a little 'label' icon after the name of four other variables. You can right click and select 'Label/Unlabel' to set things up the way you want.

ih
Super User (Alumni) ih
Super User (Alumni)

Re: How to label multiple columns to every points in Graph builder

There might be a way to do this with row labels, but one option (albeit laborious) is to add transparent bars with labels.  This can be done graphically by:

  • Start with your chart
  • Remove all row labels
  • For each value displayed (SBL_rate & 3 more)
    • In top chart, right click, add a bar
    • On bottom left expand 'Variables' and only select one y variable
    • Change bar style to single
    • Set label to value
    • In legend settings change bar transparency to zero
  • Change legend settings to only show the lines and bars on the bottom

labels.png

Names default to here( 1 );

dt1 = Open( "$Sample_data/Big Class.jmp", Invisible );

dt1Tab = dt1 << Tabulate(
	Set Format( N( 9, "Best" ) ),
	Add Table(
		Column Table( Analysis Columns( :height, :weight ) ),
		Column Table( Grouping Columns( :sex ) ),
		Row Table( Grouping Columns( :age ) )
	)
);
	
dt2 = dt1Tab << Make Into Data Table;

dt1Tab << Close Window();

dt1 << Close Window();

dt2 << Graph Builder(
	Size( 929, 449 ),
	Show Control Panel( 0 ),
	Variables(
		X( :age ),
		Y( :Name( "Sum(height)" ) ),
		Y( :Name( "Sum(weight)" ), Position( 1 ) ),
		Y( :M ),
		Y( :F, Position( 2 ) )
	),
	Elements(
		Position( 1, 1 ),
		Line( X, Y( 1 ), Y( 2 ), Legend( 13 ) ),
		Points( X, Y( 1 ), Y( 2 ), Legend( 16 ), Jitter( 0 ) ),
		Bar(
			X,
			Y( 2 ),
			Legend( 19 ),
			Bar Style( "Single" ),
			Label( "Label by Value" )
		),
		Bar(
			X,
			Y( 1 ),
			Legend( 20 ),
			Bar Style( "Single" ),
			Label( "Label by Value" )
		)
	),
	Elements( Position( 1, 2 ), Bar( X, Y( 1 ), Y( 2 ), Legend( 24 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				13,
				Properties( 1, {Line Color( 51 ), Fill Color( 0 )} )
			), Legend Model(
				16,
				Base( 0, 0, 0 ),
				Base( 1, 0, 0 ),
				Properties( 1, {Line Color( 19 ), Fill Color( 0 )} )
			), Legend Model(
				19,
				Properties( 0, {Fill Color( 2 ), Transparency( 0 )} )
			), Legend Model(
				20,
				Properties( 0, {Fill Color( 2 ), Transparency( 0 )} )
			)}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Grid Line Order( 4 ), Reference Line Order( 8 )}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position(
				{13, [0, 1], 16, [-1, -1], 19, [-1], 20, [-1], 24, [2, 3]}
			), Position( {0, 1, -1, -1, -1, -1, 2, 3} )}
		)
	)
);
Hanyuri
Level II

Re: How to label multiple columns to every points in Graph builder

Hi ih,

It works exactly what I want it to be. :D Greatly appreciate!!!!