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
ebinmohd
Level II

Adding Label for Interval in Bar Chart

Graph Builder(
	Size( 2104, 617 ),
	Fit to Window( "Off" ),
	Variables(
		X( :PSM ITEM ),
		Y( :AvgPsm_PTOV ),
		Y( :MaxPsm_PTOV, Position( 1 ) ),
		Y( :MinPsm_PTOV, Position( 1 ) ),
		Group X( :PCIE_TOGGLE ),
		Overlay( :BIOS ),
		Color( :BIOS )
	),
	Elements(
		Bar(
			X,
			Y( 2 ),
			Y( 3 ),
			Y( 1 ),
			Legend( 52 ),
			Bar Style( "Interval" ),
			Label( "Label by Value" )
		)
	),
	Local Data Filter(
		Close Outline( 1 ),
		Width( 226 ),
		Add Filter(
			columns( :PSM ITEM ),
			Where(
				:PSM ITEM == {"IOD0_PCIE0_BOT_LFT_VDDSOC",
				"IOD0_PCIE1_BOT_LFT_VDDSOC", "IOD0_PCIE2_BOT_LFT_VDDSOC",
				"IOD0_PCIE3_BOT_LFT_VDDSOC"}
			),
			Display( :PSM ITEM, "Check Box Display", Find( Set Text( "vddsoc" ) ) )
		)
	),
	SendToReport(
		Dispatch( {"Bar"}, "", OutlineBox, {Close( 0 )} ),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Set Graphlet(
				Picture(
					Try(
						loader = If( Class Exists( "hllLoader" ),
							New Object( "hllLoader" ),
							Include( "$BUILTIN_SCRIPTS/hllib.jsl" )
						);
						loader:setDebug( 0 );
						hlp = loader:lazyLoad( "hllPresets" );
						hlp:launchLabel Viewer();
					,
						Write(
							"
Hover Label: Unable to launch Preset, please check that the Preset library is available at $BUILTIN_SCRIPTS/hllib.jsl"
						);
						Write( Eval Insert( "
Exception: ^exception_msg^" ) );
						Empty();
					)
				),
				Title( "Label Viewer Preset" ),
				Reapply( 1 )
			)}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox( 2 ),
			{Set Graphlet(
				Picture(
					Try(
						loader = If( Class Exists( "hllLoader" ),
							New Object( "hllLoader" ),
							Include( "$BUILTIN_SCRIPTS/hllib.jsl" )
						);
						loader:setDebug( 0 );
						hlp = loader:lazyLoad( "hllPresets" );
						hlp:launchMarker();
					,
						Write(
							"
Hover Label: Unable to launch Preset, please check that the Preset library is available at $BUILTIN_SCRIPTS/hllib.jsl"
						);
						Write( Eval Insert( "
Exception: ^exception_msg^" ) );
						Empty();
					)
				),
				Title( "Marker Preset" ),
				Reapply( 1 )
			)}
		)
	)
);



I have problem to add Max and Min value for my Interval Bar chart. it only shows actual max - min interval.

My main goal is to make a bode plot or candle stick that shows Max, Avg and Min for an X-axis data. Max, Avg and Min are separated into different columns. I have tried bode plot chart but its fail to present the data as I want.

ebinmohd_0-1753667621583.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Adding Label for Interval in Bar Chart

After you have plot like this

jthi_0-1753677008821.png

Add points plot on top of your bar chart (right click > Add > points or hold shift and click on the points plot)

jthi_1-1753677051825.png

Next change points to use some aggregation (mean for example)

jthi_2-1753677086392.png

Then from points Variable disable average column and set labels by value

jthi_3-1753677120135.png

You can then modify marker size for example to make the points much smaller. Optionally you could use Float bar charts instead of points but it takes a bit more effort as you have to create separate float bar for each of the columns you wish to label. 

-Jarmo

View solution in original post

4 REPLIES 4
jthi
Super User

Re: Adding Label for Interval in Bar Chart

After you have plot like this

jthi_0-1753677008821.png

Add points plot on top of your bar chart (right click > Add > points or hold shift and click on the points plot)

jthi_1-1753677051825.png

Next change points to use some aggregation (mean for example)

jthi_2-1753677086392.png

Then from points Variable disable average column and set labels by value

jthi_3-1753677120135.png

You can then modify marker size for example to make the points much smaller. Optionally you could use Float bar charts instead of points but it takes a bit more effort as you have to create separate float bar for each of the columns you wish to label. 

-Jarmo
ebinmohd
Level II

Re: Adding Label for Interval in Bar Chart

It's almost there! But why i cannot see the label for the points? 

ebinmohd_0-1753707546065.png

 

jthi
Super User

Re: Adding Label for Interval in Bar Chart

You are using older version of JMP which will require some extra hoops and loops if you wish to use points. I would suggest using the floating bar for JMP versions before JMP18.

-Jarmo
ebinmohd
Level II

Re: Adding Label for Interval in Bar Chart

I see, thank you! I get my results! Thank you again!

ebinmohd_0-1753752262786.png

 

:)

Recommended Articles