cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
hogi
Level XII

Bar Chart: value order?

Why is the value order of a stacked bar chart opposite to the value order of the legend?

 

hogi_0-1678297709692.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XII

Re: Bar Chart: value order?

Thanks.
Seems that this is the explanation why the Graph looks like this ...

I still believe that no user wants to have the order in the graph and the legend go in opposite directions.
At least nobody in the audience.

 

I just detected a wish from 2021 asking for a one-click solution for this problem:
Reverse order button in legend settings 

e.g. something like this:

hogi_0-1678299502624.png

 

 

View solution in original post

6 REPLIES 6

Re: Bar Chart: value order?

I think this is from history. Traditionally bars are built from the bottom-up, like stacking blocks on top of each other. Hence the name STACKED bar chart. However, when reading a legend, we read from the top down, so the first item placed goes at the bottom of the bar, but at the top of the list. You can edit the order of the items in the legend by double-clicking it and using the arrow buttons to move items.

 

Dan_Obermiller_1-1678299262948.png

 

Dan Obermiller
hogi
Level XII

Re: Bar Chart: value order?

Thanks.
Seems that this is the explanation why the Graph looks like this ...

I still believe that no user wants to have the order in the graph and the legend go in opposite directions.
At least nobody in the audience.

 

I just detected a wish from 2021 asking for a one-click solution for this problem:
Reverse order button in legend settings 

e.g. something like this:

hogi_0-1678299502624.png

 

 

Joseph_Reese
Level IV

Re: Bar Chart: value order?

Hi @hogi and nice profile in the community! Always great to get to know community members better.

 

I had submitted that wish list idea when I was a customer of JMP and felt the same as you. If you have been using JMP for a long time then you may be used to this type of behavior but that doesn't mean it is intuitive. I found that most people trying to read these graphs had to take a moment to understand this ordering and it never seemed appropriate to assume that everyone looking at the graph would know to interpret the legend and graph in opposite ways. A reverse order button would make it easy for both approaches to be easily applied, regardless of your preference. 

hogi
Level XII

Re: Bar Chart: value order?

yes, definitely, with the aligned order the information will be much easier to understand.

 

@XanGregg could add a section about legens to his talk:
Plenary: All Graphs Are Wrong, but Some Are Useful - Xan Gregg 

 

You can create graphs (legends) that the eye can analyze without the brain - and you can create graphs (legends) where there is a clear threshold as to who will understand the graph correctly

Re: Bar Chart: value order?

I like the current behavior that leads to the levels going in opposite directions in the plot and the legend. I have never had a problem with this behavior. I read the plot one way and the legend the other way.

hogi
Level XII

Re: Bar Chart: value order?

For the Caption Box, is there an option to put the numbers in the "right" order?

 

Alternatively:
Is there a setting to use the colors of the plot also for the caption to give the audience a chance to get it right

 

hogi_4-1681826898143.png

 

Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
	Variables( Group X( :sex ), Overlay( :age ) ),
	Elements(
		Bar( Legend( 3 ), Bar Style( "Stacked" ), Label( "Label by Value" ) ),
		Caption Box( )
	)
);