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
Benjamin_Fuerst
Level III

How to add categorical variable as caption box or similiar in a graph

Hello JMP Community,
I would like to add a unit of measure as an additional information in my graph.

This is what i could create, painted in there is a possible solution I would like to have.

 

Thanks for a hint how this could be done!

Have a great weekend everybody!

Ben

 

Benjamin_Fuerst_1-1680265905780.png

 

What I also tried:
Label by value for the right part: here JMP takes the value which the bars are colored by. But this is a different categorisation I need and dont want to change!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Benjamin_Fuerst
Level III

Re: How to add categorical variable as caption box or similiar in a graph

Hi,

I figured out a workaround.

 

One can label the Unit of measure in the dataset and then select label by row in the graph builder.
If one still needs the "sum" attached to the bars, you can add a caption box "per factor" with the sum

 

Benjamin_Fuerst_1-1681218347746.png

Benjamin_Fuerst_2-1681218483359.png

 

 

View solution in original post

6 REPLIES 6
hogi
Level XII

Re: How to add categorical variable as caption box or similiar in a graph

You could use a bar graph on the left and a heatmap on the right - then use Label by Value.


OK for the labels
... but you need the "color" for something else, right?
What a pity that custom efined row colors don't overwrite the color settings of the GraphBuilder plot ....

Some days ago I posed a wish for an overwrite dropzone
the idea: use an additional column to change the settings for some rows AFTER applying the GraphBuilder legend settings.
Kudos are welcome: GraphBuilder: Overwrite Dropzone  

 

But perhaps there is no need for an overwrite drop zone - let's see what other users suggest within the possibilities of Jmp 17 ...

hogi_0-1680287410972.png

 

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Graph Builder(
	Show Control Panel( 0 ),
	Variables(
		X( :height ),
		X( :age ),
		Y( :name, Order By( :height, Ascending, Order Statistic( "Mean" ) ) ),
		Color( :sex )
	),
	Elements( Position( 1, 1 ), Bar( X, Y, Legend( 4 ) ) ),
	Elements(
		Position( 2, 1 ),
		Heatmap( X, Y, Legend( 7 ), Label( "Label by Value" ) )
	)
)

 

Benjamin_Fuerst
Level III

Re: How to add categorical variable as caption box or similiar in a graph

@hogi you are right I need color for something Else. You got my kudo for your ideal on the wishlist!

Re: How to add categorical variable as caption box or similiar in a graph

Did you try the Units column property to see if the labeling is what you want?

Benjamin_Fuerst
Level III

Re: How to add categorical variable as caption box or similiar in a graph

Hi Mark,
Do I understand you correct that you are refering to the column property "unit"? I already am using the Units column property. Y units are a fixed currency. The additional Information I want to Show is to what units are These Costs specific ( X per L, X per g etc).
Any other idea how to Show that in a plot like this?

Re: How to add categorical variable as caption box or similiar in a graph

Never mind. I realize you are plotting some continuous quantity on the X axis on the left side. JMP assumes that all the bars have the same measure, but they don't in your case.

Benjamin_Fuerst
Level III

Re: How to add categorical variable as caption box or similiar in a graph

Hi,

I figured out a workaround.

 

One can label the Unit of measure in the dataset and then select label by row in the graph builder.
If one still needs the "sum" attached to the bars, you can add a caption box "per factor" with the sum

 

Benjamin_Fuerst_1-1681218347746.png

Benjamin_Fuerst_2-1681218483359.png