how to put summary stats on graphes

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
anozman
Posts: 59
Joined: Mon Jan 30, 2012 5:16 pm

how to put summary stats on graphes

Unread post 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)
jonasdovern
Posts: 97
Joined: Sat Apr 11, 2009 10:30 am

Re: how to put summary stats on graphes

Unread post by jonasdovern »

You can use the GRTEXT function to do this inside an SPGRAPH environment.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: how to put summary stats on graphes

Unread post 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.
Post Reply