cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
djhanson
Level V

How to round Show Grand Mean on a chart?

I've created a variability chart, but is there a way to round the resulting Show Grand Mean? It defaults to 10 decimal places which stretches the chart out horizontally. I'd like it to round to say 2 decimal places:

chartVar = Variability Chart(
Y(:YVALUE),
X(:XVALUE),
Show Grand Mean,
...
any help appreciated. thx, dj
2 REPLIES 2

Re: How to round Show Grand Mean on a chart?

Unfortunately I don't know how to change the annotation for the grand mean, but maybe you could delete the annotation altogether, and then annotate the chart itself. I've done the same sort of thing below as in the other two recent related queries:


style="font-size: 9pt; font-family: "Courier New"; color: black;">
style=""> 





style="font-size: 9pt; font-family: "Courier New"; color: black;">
style=""> 





style="font-size: 9pt; font-family: "Courier New"; color: black;">dt

style="font-size: 9pt; font-family: "Courier New"; color: navy;">=

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: rgb(0, 0, 221);">Open

style="font-size: 9pt; font-family: "Courier New"; color: black;">(

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: purple;">"$SAMPLE_DATA/Quality
Control/Coating.jmp"

style="font-size: 9pt; font-family: "Courier New"; color: black;">
)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">
style=""> 





style="font-size: 9pt; font-family: "Courier New"; color: green;">/*
Create a basic variability
chart */

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">
style=""> 





style="font-size: 9pt; font-family: "Courier New"; color: black;">vc

style="font-size: 9pt; font-family: "Courier New"; color: navy;">=

style="font-size: 9pt; font-family: "Courier New"; color: black;">
Variability Chart(





style="font-size: 9pt; font-family: "Courier New"; color: black;">
style="">      
Y(

style="font-size: 9pt; font-family: "Courier New"; color: navy;">:

style="font-size: 9pt; font-family: "Courier New"; color: black;">Weight
)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">
style="">      
X(

style="font-size: 9pt; font-family: "Courier New"; color: navy;">:

style="font-size: 9pt; font-family: "Courier New"; color: black;">Sample
)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">
style="">      
Std
Dev Chart(

style="font-size: 9pt; font-family: "Courier New"; color: teal;">0

style="font-size: 9pt; font-family: "Courier New"; color: black;">
)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">
style="">      
Show
Grand Mean





style="font-size: 9pt; font-family: "Courier New"; color: black;">
style="">      
)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">

 





style="font-size: 9pt; font-family: "Courier New"; color: green;">//
vc << show tree
structure; // Find out where everything is;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">

 





style="font-size: 9pt; font-family: "Courier New"; color: black;">vcr

style="font-size: 9pt; font-family: "Courier New"; color: navy;">=

style="font-size: 9pt; font-family: "Courier New"; color: black;">
vc

style="font-size: 9pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: rgb(0, 0, 221);">report

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">vcr[FrameBox(

style="font-size: 9pt; font-family: "Courier New"; color: teal;">2

style="font-size: 9pt; font-family: "Courier New"; color: black;">)]

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 9pt; font-family: "Courier New"; color: black;">
delete

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: green;">//
This object is
wasting space, so delete it;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">

 





style="font-size: 9pt; font-family: "Courier New"; color: green;">//
Then annotate the chart (which
is FrameBox(1) in the report) instead;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">

 





style="font-size: 9pt; font-family: "Courier New"; color: black;">ymax

style="font-size: 9pt; font-family: "Courier New"; color: navy;">=

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: rgb(0, 0, 221);">max

style="font-size: 9pt; font-family: "Courier New"; color: black;">(

style="font-size: 9pt; font-family: "Courier New"; color: rgb(0, 0, 221);">column

style="font-size: 9pt; font-family: "Courier New"; color: black;">(

style="font-size: 9pt; font-family: "Courier New"; color: black;">dt

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: purple;">"Weight"

style="font-size: 9pt; font-family: "Courier New"; color: black;">)

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 9pt; font-family: "Courier New"; color: black;">
get values)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">GM
style="">  

style="font-size: 9pt; font-family: "Courier New"; color: navy;">=

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: rgb(0, 0, 221);">mean

style="font-size: 9pt; font-family: "Courier New"; color: black;">(

style="font-size: 9pt; font-family: "Courier New"; color: rgb(0, 0, 221);">column

style="font-size: 9pt; font-family: "Courier New"; color: black;">(

style="font-size: 9pt; font-family: "Courier New"; color: black;">dt

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: purple;">"Weight"

style="font-size: 9pt; font-family: "Courier New"; color: black;">)

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 9pt; font-family: "Courier New"; color: black;">
get values)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">

 





style="font-size: 9pt; font-family: "Courier New"; color: black;">vcr[FrameBox(

style="font-size: 9pt; font-family: "Courier New"; color: teal;">1

style="font-size: 9pt; font-family: "Courier New"; color: black;">)]

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 9pt; font-family: "Courier New"; color: black;">
add graphics
script(

style="font-size: 9pt; font-family: "Courier New"; color: rgb(0, 0, 221);">text

style="font-size: 9pt; font-family: "Courier New"; color: black;">(

style="font-size: 9pt; font-family: "Courier New"; color: black;">boxed

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">
erased

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">
{

style="font-size: 9pt; font-family: "Courier New"; color: teal;">0.25

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">
ymax}

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">
(

style="font-size: 9pt; font-family: "Courier New"; color: purple;">"
Avg = "

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: navy;">||

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: rgb(0, 0, 221);">char

style="font-size: 9pt; font-family: "Courier New"; color: black;">(

style="font-size: 9pt; font-family: "Courier New"; color: black;">GM

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: teal;">10

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: teal;">2

style="font-size: 9pt; font-family: "Courier New"; color: black;">)

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: navy;">||

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: purple;">"
"

style="font-size: 9pt; font-family: "Courier New"; color: black;">)))

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">

 





style="font-size: 9pt; font-family: "Courier New"; color: green;">//
End of program;

style="font-size: 9pt; font-family: "Courier New"; color: black;">




 

Re: How to round Show Grand Mean on a chart?

Actually, I think I may have just worked out how to solve the original problem. The number of decimals to which the grand mean is reported seems to be calculated from the number of decimals in the format of the original column of data plus two - so for example if the format of the column in the original data table is Fixed Dec(10, 3), the grand mean will be reported to 3+2=5 places. So to get just two places reported in the grand mean, change the format to Fixed Decimal with no decimal places.