cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
MichaH
Level II

Proper labels without stacking

Hello,

how can I get proper labels for data without stacking. I cannot stack as I need to see rows dependencies, but on the other hand side need to have for each category only relevant data. I attached also the file. 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Proper labels without stacking

Here is a script which should create the graph (mostly, it doesn't fix legend)

Names Default To Here(1);

dt = Open("$DOWNLOADS/Points.jmp");
dt << Clear Row States; // to remove labels

new_col = dt << New Column("Row", Numeric, Ordinal, Formula(Row()));

new_col << Suppress Eval(1);


gb = dt << Graph Builder(
	Size(1076, 744),
	Show Control Panel(0),
	Variables(Y(:VA), Y(:WA), Group X(:Type), Overlay(:Row)),
	Elements(
		Position(1, 1),
		Box Plot(Y, Overlay(0), Legend(8)),
		Points(Y, Overlay(0), Legend(10)),
		Bar(Y, Legend(12), Bar Style("Float"), Label("Label by Value"))
	),
	Elements(
		Position(1, 2),
		Box Plot(Y, Overlay(0), Legend(9)),
		Points(Y, Overlay(0), Legend(11)),
		Bar(Y, Legend(13), Bar Style("Float"), Label("Label by Value"))
	),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.00005)})}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox(2),
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.000001)})}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox(3),
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.000001)})}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox(4),
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.000001)})}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox(5),
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.000001)})}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox(6),
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.000001)})}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position(
				{8, [0, -3], 10, [2], 12, [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
				19, 20, 21, 22, 23, 24, 25, 26], 9, [1, -3], 11, [3], 13, [-3, -3, -3, -3, -3,
				-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3]}
			)}
		)
	)
);

Important things are setting variables for graph builder

jthi_0-1706529693641.png

and customizing each bar segments width proportion to be much smaller

jthi_1-1706529725713.png

and you end up with

jthi_2-1706529762560.png

and if you need classification I would maybe consider modifying the marker

-Jarmo

View solution in original post

7 REPLIES 7
jthi
Super User

Re: Proper labels without stacking

What are "proper labels" in this case?

-Jarmo
MichaH
Level II

Re: Proper labels without stacking

Hi, please see attached.

MichaH
Level II

Re: Proper labels without stacking

See here stacked...

jthi
Super User

Re: Proper labels without stacking

One option is to add new column which has the row numbers and then use that as overlay for float type of bar charts and enable labels on those. Then use customize to make those "bar charts" smaller and hide extra values from legend. (This is is very annoying to do though)

-Jarmo
MichaH
Level II

Re: Proper labels without stacking

Hi, can you please show me how please?

jthi
Super User

Re: Proper labels without stacking

Here is a script which should create the graph (mostly, it doesn't fix legend)

Names Default To Here(1);

dt = Open("$DOWNLOADS/Points.jmp");
dt << Clear Row States; // to remove labels

new_col = dt << New Column("Row", Numeric, Ordinal, Formula(Row()));

new_col << Suppress Eval(1);


gb = dt << Graph Builder(
	Size(1076, 744),
	Show Control Panel(0),
	Variables(Y(:VA), Y(:WA), Group X(:Type), Overlay(:Row)),
	Elements(
		Position(1, 1),
		Box Plot(Y, Overlay(0), Legend(8)),
		Points(Y, Overlay(0), Legend(10)),
		Bar(Y, Legend(12), Bar Style("Float"), Label("Label by Value"))
	),
	Elements(
		Position(1, 2),
		Box Plot(Y, Overlay(0), Legend(9)),
		Points(Y, Overlay(0), Legend(11)),
		Bar(Y, Legend(13), Bar Style("Float"), Label("Label by Value"))
	),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.00005)})}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox(2),
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.000001)})}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox(3),
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.000001)})}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox(4),
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.000001)})}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox(5),
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.000001)})}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox(6),
			{DispatchSeg(BarSeg(1), {Set Width Proportion(0.000001)})}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position(
				{8, [0, -3], 10, [2], 12, [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
				19, 20, 21, 22, 23, 24, 25, 26], 9, [1, -3], 11, [3], 13, [-3, -3, -3, -3, -3,
				-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3]}
			)}
		)
	)
);

Important things are setting variables for graph builder

jthi_0-1706529693641.png

and customizing each bar segments width proportion to be much smaller

jthi_1-1706529725713.png

and you end up with

jthi_2-1706529762560.png

and if you need classification I would maybe consider modifying the marker

-Jarmo
MichaH
Level II

Re: Proper labels without stacking

Thank you a lot despite I was not able to replicate.