Page 1 of 1

how to put summary stats on graphes

Posted: Thu Mar 07, 2013 8:07 pm
by anozman
Does anyone know simple ways to put summary stats such as mean, variance and skewedness, etc on the graphs? I have coded a simple program using spgraph, but do not know how to put summary numbers on these graphs

thank you very much for your help.
anozman

Code: Select all

spgraph(vfields=2,hfields=2,header="test")

density(type=gaussian)  variable1 / sgrid1 sdensity1
density(type=histogram) variable1 / hgrid1 hdensity1
scatter(style=bargraph,overlay=line,ovsame,header="variable 1") 2
# hgrid1 hdensity1
# sgrid1 sdensity1

density(type=gaussian)  variable2 / sgrid2 sdensity2
density(type=histogram) variable2 / hgrid2 hdensity2
scatter(style=bargraph,overlay=line,ovsame,header=" variable 2") 2
# hgrid2 hdensity2
# sgrid2 sdensity2

density(type=gaussian)  variable3 / sgrid3 sdensity3
density(type=histogram) variable3 / hgrid3 hdensity3
scatter(style=bargraph,overlay=line,ovsame,header=" variable 3)") 2
# hgrid3 hdensity3
# sgrid3 sdensity3

density(type=gaussian)  variable4 / sgrid4 sdensity4
density(type=histogram) variable4 / hgrid4 hdensity4
scatter(style=bargraph,overlay=line,ovsame,header=" variable 4") 2
# hgrid4 hdensity4
# sgrid4 sdensity4

spgraph(done)

Re: how to put summary stats on graphes

Posted: Fri Mar 08, 2013 5:06 am
by jonasdovern
You can use the GRTEXT function to do this inside an SPGRAPH environment.

Re: how to put summary stats on graphes

Posted: Fri Mar 08, 2013 6:42 am
by TomDoan
jonasdovern wrote:You can use the GRTEXT function to do this inside an SPGRAPH environment.
See, for instance, the procedure on HISTOGRAM.SRC, which does something similar to what you want.