Choose Language Hide Translation Bar
Highlighted
Level III

How to set error bars to back as default

Hello,

For viewing purposes, I would like to hide the negative error bars for my bar chart. I have accomplished this using the Graph Builder "customize" options but I would like to know if this can be set to default.

Any time that I make a change to a variable or open the script the negative error bar shows up, so the formatting does not hold in the JSL.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User

Re: How to set error bars to back as default

I have a trick to get what you want. However, I am reluctant in sending a reply, because as a statistician, it is an understatement to say that I am *not* a fan of these plots. I find them much less informative than a boxplot or density plot for many observations or a raw data plot when there are few observations. That said, on several occasions I have sent to JMP my wish to be able to set graph element order. You can set it for a custom graphics script, or line segments, but not other elements (at least that I know of).

The trick is to get the bar graph drawn last. A simple way to do that is to create the bars again. Note the script adds the element bars with error bars, then it adds them again, so they are last.  A redo will keep the order.

So this should help, but I recommend you consider other graphs.  I know these are popular with some university profs, so you might not have a choice. Good Luck.

``````Names Default to Here(1);
dt = Open("\$sample_data/Big Class.jmp");
gb = dt << Graph Builder(
show control panel(0),
Lock Scales( 1 ),
Variables( X( :sex ), Y( :height ), Group X( :age ), Color(:sex) ),
Elements( Bar( X, Y, Legend( 2 ), Error Bars( "Standard Deviation" ) ),
Bar( X, Y, Legend( 3 ) )
),
SendToReport(
Dispatch(
{},
"sex",
ScaleBox,
{Min( -0.5 ), Max( 1.5 ), Inc( 1 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"height",
ScaleBox,
{Min( 50 ), Max( 72.5 ), Inc( 5 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"Graph Builder",
FrameBox( 2 ),
{Grid Line Order( 1 ), Reference Line Order( 3 )}
)
)
);``````

2 REPLIES 2
Highlighted
Super User

Re: How to set error bars to back as default

I have a trick to get what you want. However, I am reluctant in sending a reply, because as a statistician, it is an understatement to say that I am *not* a fan of these plots. I find them much less informative than a boxplot or density plot for many observations or a raw data plot when there are few observations. That said, on several occasions I have sent to JMP my wish to be able to set graph element order. You can set it for a custom graphics script, or line segments, but not other elements (at least that I know of).

The trick is to get the bar graph drawn last. A simple way to do that is to create the bars again. Note the script adds the element bars with error bars, then it adds them again, so they are last.  A redo will keep the order.

So this should help, but I recommend you consider other graphs.  I know these are popular with some university profs, so you might not have a choice. Good Luck.

``````Names Default to Here(1);
dt = Open("\$sample_data/Big Class.jmp");
gb = dt << Graph Builder(
show control panel(0),
Lock Scales( 1 ),
Variables( X( :sex ), Y( :height ), Group X( :age ), Color(:sex) ),
Elements( Bar( X, Y, Legend( 2 ), Error Bars( "Standard Deviation" ) ),
Bar( X, Y, Legend( 3 ) )
),
SendToReport(
Dispatch(
{},
"sex",
ScaleBox,
{Min( -0.5 ), Max( 1.5 ), Inc( 1 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"height",
ScaleBox,
{Min( 50 ), Max( 72.5 ), Inc( 5 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"Graph Builder",
FrameBox( 2 ),
{Grid Line Order( 1 ), Reference Line Order( 3 )}
)
)
);``````

Highlighted
Level III

Re: How to set error bars to back as default

Thanks for this solution and the commentary. I agree, these plots are not often the best conveyors of information at hand.