RESEARCH REPORT
Statistical g raphics in SURVO 76 EDITOR
BY
Seppo M,ustonen
No.33 Febru ary 1982
DEPARTMENT OF STATISTICS UNIVERSITY OF HELSINKI
SF OOlOOHELSINKI
1OFINLAND
tsBN 951-45-2561-2 tssN 0357 -9778
S.l'lustonen:
Statistical
sraphicsin
SURV0 76EOITOR t6.e.tg8p I
1. Introduction
The
interactive statistical
systen SUfiVtl ?6 provides several neanEfor graphical
representationof statistical data.
Thpre are noduleslike
DIAGRAI'I and PL0T
for scatter
diagrans and tinre series, HIST0{gr
histograms and frequency curvesrCURVE
{sr analytic
ciJrves,SURFACE
for analytic
sur{aceEin central projection,
SCURUE
{or
Andress'{unction plots,
FACES
for
Cherns{{'s faces,CURVEA
for analytic
curvesin implicit
form.During SURV0 ?6 conversations
ihe
graphsare
created by entering the paraneters neededfor plotting,
Theplots
may be constructed gradually through geveral steps and various gråphs (like scatter
diagrams andcutves) may be conbined
in the
sanepicture.
SURU{I ?5 EOIT0B
is
an extensionof ihe
systeno{{ering report
gensr-ating
andtext
processingactivities.
EDIT0Ralso
includes proceduresfor interactive
numerical andstetiEtical
computingin editorial
node(l{ustonen 1980, 1981 ).
0n
this
besiEit is naiural ta
develoF procedures{or statiEtical
gråphics,too,
SURV0 ?6 EDIT0R notl includesa
FLOT operation{or
thesetasks.
FL0Tis able to
prsduce,for
example,the folloning
graphicrepresEntations on
the
graphic IRT:h,gr,_d"*g*fgp,g
(vertical
åndhnrizontal, rr
frequencieE andpprcFntagBs,
single
åndmultiple, pie
chartE,matrix
diagrämg) scg!.!gl. $.laptp.tnp (with
severä 1 optionaI
charac ter'ist"ics ip r obab
i lity
p lgts ,n_Lp!:
.,pf
trnultip
le)
t;p.g"Sgt*egp rI+ I y Lg.-r-u r vF.å s:rd.*tås
i.hsl-ql--q!.uså
As an axanple
let
us considerthe plotting of a ber diagran. In
the upperhalf of the display 1.1
ne havea
data Eet anda
FL0T operation typedin the edit {ield. In the louer part o{ the
sanedisplay
the graph creaied byactivatins the
FL0T operationis
preEentEd, Activa-tion of the
FLOT operation takesplace,
ås alwaysin
EOIT0R oper-ations,
by{irst
novingthe
cursorto the
operationline
and ihen pressinsthe
key C0liTINlJE.5 " l'lu ston Fn
: Statigtica I
g rap hic Ein
SURU* ?{' En I TCI R 1L.-} 1L.TL}'J -L\JaLe.t-tlJl-
DtåP *"å. .1
I jl
I
s
{ 100x 1
t
? t
i-l
4 5 6 7
I I
tCI 11
H
Iå{Fr
14
suRu0 76 rDililR
([]13?9
ä"1'lustsnen*
*Number'
of
rnåIrs .t1000i i"nvårisus
åge srnuFg*
*DATA I,IALT S, A , B, il
tl
0-14 15-ä4 A$weden 841
5?1*
Denmarl.<564
395*
FenLand 5öä
399n Iceland 3ä
ääB
Norway 474
316*
-tPLO T I,IALT 5
* t
e5*44 45*e,4
118fi
9307::r
5:r?7?.1
468ä9
ä0534
44465*
t- {Jt- JL'J rrfrfl
;'Uö pöil
1,0
ä5r
HBf;R D I frGRNT,I
|]F
14 ftLES Su*red enDenirrark
Flnland Icelend
l,l
oruöy
1000 2'J00 3000 4 0#fJ 5 000
o-r4 n
1s-24m ?s-44 m 4s
64ffi 6s-ffi
Hhen
plottins bar
diagransthe
FL0T cperation hasonl'/
ane påråme-ter, the
naneo{ the
dataset to
beptatted (in this
case I'IALE$i" Thedata
set
hasto
be de{ined bya
DATAspecificatisn.
0ATA {online
4}gives
the
naneof the
dataset
{I'IALES),the {irst
andlest line
a{observation values (A,B) and
the line o{ the
colunnlabels
(l'l).In this
cåsea plain
FLOT operation producesthe
graph Presented inthe
lourarhal{ o{ drsp.1.1,
bui, various featureE,of tlre ploi
nayeasrly
be adjusted by neanso{ eLtra
specifrcationE uhichare
tvPedin
ttreedit fie.ld prior to activation of
the PL0T oPeratron.For instance, to
naketlre
sane graphin vertical
bars andin
per-centages, we add
the speci{ication
IYFE=ZVBARin the edrt {ield
andafter actrvatisn o{ the
FL0T operation we haveS.l'luEtonen
I Statrstical
graFhicsin
SURUO 76 EDIT0R 16, e . 198[[rEP-*fd
SURUO 76 ID I TOR (
[
] 13 79 $. l'1u Eton enI
e
4
5 6 7
I
9 10 11
u
J-r-lt:r
14
*
*Number'
nf
maleE
( 1000)
rn*
*DA TA I,IALE $, A , B, I,1
1,1
0-14 15-e4 e5*44 A$weden 841 57f
11BBt
D ennark 564 ::85
731*
F in land 506 399
7?7*
Iceland ::ä ??
e9B
Nnrway 474 316
5::4f;
*FL0T t'lALt5_
* TYFE =TUtsA R
*
vår'iouE åge gr0upg
45-64
6s-9::0
5855:r?
:r08468
e 0ee0
1044?
?51U UBåFi
.t n'n
I UU 80 (,4
4A
t\ tt
TU
D i AGR NI'{ OF l,1 ALES
S'*,e d en Denna rk
Flnland Icel.and
Nonrrayo-14
n
1s-a4ffi
?s*44m 4s*64ffi 6s- ffi
Several
extre speci{ications
areavailable
dppending onihe
type o{graph
in question.
Eachspeci{ication
hasa defautt
value uhich cor- respondsts
somekind of a
standardalternative.
Thus evenwithout
anyextra specr{icatirns a
reasonableplot
should be obtaj.ned, as a1r'eady seenin Disp.l.l. In fact, rn this
casethe de{ault
valupso{
theextra specifrcatrons
correspondto the follouing
s,et up2S.l'lustonenl
Statrstiral
graphicsin
5URU0 76EDIT0R 16,r,198ä
4D-rge'å#
E. 1*
*Numbernf
males
t:!.000) in vsrisus
ågB sr'$ups3* 4
*DA TA l'lAlt S, ff , El, f,l5
l-l fi-14 15-ä4 ä5-4445-64
65*6
A Stl *den
S4I 571 11S8 9:r0
5fr51 *
D enmark 564 :r85 ?:rl 5:t?
3088 *
F in land 506 ::99 7X7 468
ä0äI * Iceland 3ä äA tg ä0
ICI10 n Narnray 474 316 534 44ä
ä5111
*1ä
*F Ltl T l{Alt S-tg
*TYF t=HBAR DEUI[[=Sl-4
*H0l'trE =10CI ,?ö
$ I Zt =6{10 , 4 St]15
# SCALE =ö , 1ö00 n ä 0t]0., SSSS , 4 00* , 5öfi016
*SHADIT'IG=0,ä,4,7,917
ILEGENS=-ls
*HEADäR"[EFf,_ i$å9Fry"_g[*mLH_S19
*XSIU=ä,9,1 YSIU*f;,5,tr F'[N=Lä0
*el
*ää* ä3*
0bserve
that the
orderof the extra speci{ications is innaterlel. If
a specification
appears severaltines in the edit {ield, the {rrst r,rilI
be used.In
orderto
have severalplotting
schemesin the
sanefield, albor- der line o{ the forn lt. ... (as line
21 above) can beset to
rso-late
then {rom eachother.
The datasetg,
defined bythe
DATAspecr{i- cations, åre,
hor,lever, 9lobaI and accessiblefron
anysubfield
lirnited bythe *.,... lines.
To gain
the
nexinum adventageo{ this
technique,the
user may createedit {iies
containing ready madeptotting
schemes{or
subsequent app-Iisations. Typically,
from one tlell-designedplotting
scheme geveralvariants
nay berapidly
composed byeditins
soneof the extra apeci{i-
cations.At thp
endof this report
an appendixincluding
several reedy-nedeplotiing
schemes togethersith the {inel
outputt+ill
be prese'nted.Hence,
the
user nayeasily
generåtehis
ot,tn solutionE ofithe
basisof
theEe exanples.The next chapter
t.litl
be devotedto a
nore thorough account on thePLUT operation
in
various fonnso{ plots.
Theplots in the
appendix are alEoto
be used as anrllustration of the {acts
presented.During
the actual sork at the
computerinfornation
neededfsr plot-
ting
nay be obtained by usingthe inquuy
systemo{
5URU0 76 EDIT0R.The keyword PLOT? displays
all the essentials
nelatedto the
PL0T operation andto rts extra
specrfications.i.
$URV0 76[DI'filR
([i"t973S.l"tustonpn
{100x100}S.l,lustoneni
Statistical
graphrcsrn
5URV0 76EDIT0R 16.e.198e
52.
The PL0T.opBqation and 1_tsexira
speci{icatrongThe
{ollowing
chapterswill
coverthe rules for
usingthe
PL0Toperation
in ptotting
varioug typesn{ statistical
graphs. Exenplesane given
in the
appendix.AlI
formsnf the
FL0T operationrequire that the
datato
be plottedrs
presented undera
DATAspecifrcation.
DATA inane
of the dala set),L1,LI,L::
de{rnes
a
data Eet on lineELl-L?.
Eachline
includes one observationvector in the
{orn.{nameo{
observation)X(f) X(2) .., X(l'l). Line
LS specr{resthe
nameso{ the
varrablesX(1),...1(l'1
).Note
also that tlre line lebels Ll,Le,L3 ny'be either integers
or Eymbolic(a
character placedin
tl-recontrol
colunn),2.1
Bar andpie
diaqrams PL0T .inameof a
data set)plots a
h,ar diagrarno{ a
dataset
de{ined bya
DATAspeci{ication, Piotting is controlled
bythe follskring ertra specifications
typed inthe edit {ipld!
TYPE, SCALE" SHAOINS' LEGEND, HEAOER, TEXT, HOl'tE,SIZE, XOIU, YDIV, EAF, SPACING, PLAN" LI}1ITS,.FEN, FRAI.IE,
A.1.1.
TYFETYPE speci{ieE
the type of the bar
diagranin the
PLUT operation.0e{ault is
TYFE=HBAR(hsrizsntal
bardiagran}.
Thealternatives
arETYFE=UBAR
vertical bar
diagran,TYFE=ZHBAR
horizsntal bar
diagranin
percentages,TYPE=lUBAR
-
vertical bar
diagramin
percentages,TYPE=l'tHBAR
nultiple horizontal
ban diagran,TYPE=l,lUBåR
nultiple vertical bar
diagranTYPE=P IE
rnuitiple pip
diagrantfntal
åreå Fropontionalto
cslunn sun)TYPE=XP IE
nultiple pie
diagran(t'otal
area=constant)TYPE=i'IATRIX
natrix
diagramnith
shådedcells
accordingto the
data valuesa.1.e.
scALESCALE=tlst value),'iEnd
value),.,.,{nax.va}ue}
specifies the
Ecale andthe scale labels
onthe X-axis in
HBAR dia-grans and on
the Y-axis in
VBAR diagratns.I+
SCALEis nst
given,scaling
andlabelling is
automatic and EelectEd by usingthe
valueEin the
dataset
asa basis.
Hence, when automaticscaling is
used, nooverflow
o{
barsin the
gnaph may occut.SCALE=- neanE
that ihe
(automatic) scaleuill not
be displayed.S.l{ustoneni
$tatistical
sraphics :.n SURU0 76EDIT0R 16"t.198e
6E.1.3.
SHADINGSfiADING=i,hst
o{
shading values0,1,e'...,10) or 0,-1r-8,...,-10 or
0r11,le'13'14specifies a
shading{or
eachsection of the bars.
The vålues0,1'e,...
rå+er
t0
tones {romu*hite" t0 "black"
(on Paper),I+
SHAOINGis not given, the
shading valueg depend onthe
nunber gof variables {sections) to
beplotted.
$ectioni siil
then have sha-ding
value R0UND(11*(i-I)/g,0). For eranPle,i{
g=5,the de{auIt
cor- respondsto
SHADIt'lG=0,?,4, ?,9.E.
I.4.
LEEENOLE0END ={str ing*}, rthou t-.spac es)
gives
a declaration for the dif{erent
shadings specr{red autonatrcallyor
by $HACIING.Oefault is
an errPtvstring {r.e.
nodecleration,
butlist o{
shadingsis plotted),
LEGEND=- neensthat all
declaratrons are osritted.A,1.5
HEAOERHEADE R=.lstr in g-t,, itl-rou t-sPac es)
gives
a title to-be plotted in the
upperle{t
cornero{ the
prcturearea.
De{ault rs
HEADER=r.tyPe}-D IAGRAl't-0F-i.datai
Since
underlining is
ignoredin plotting,
undenlinethe
wholetext
or use'-' in
placeo{ a
blank.HEA0ER=- neans
that
no headeris plotted.
l'fore
text
mey beplotted
bye
TEXTspeci{ication.
e.1.5.
TEXTTEXT={Iist
of text
nanes}lists the
variouEtext
nanes. Each nenbero{ this lrst
hasto
bedefr-
nedin the edit {ietd in the
forrn{text
nanp}={textto
beplotted},t,y,{size},{x
spacing),.iy EPacing) wherexry år€ the
coordinates(in piatting units) n{ the first
character
o{ the tprt, 4size} (optional} is the letter sire
(de{eult=l), and .ix spacing),{y
sFacing}toptional) are
character spacing paraneterg tdefault=8,0).{text-to-be-plotted}
hasto
bea Etring without
EPåce5, Since under'-tlning is
ignoredin plotting"
underlinethe
t.lholetext or
use'-'in
plece
of a
blank.?. 1.
?.
H0I1EHfll,lE=<,x coord. )
,.-y
coord. )specifies the location of the
lo1xerleft cotnpl o{ the
gråPh 1alth re5-pect of the current
homePosition of tfie
pen. Coordinatesare
given rnp
lotting units.
Default
i.s H0l'lE=100,?0for bar
diagrans onthe
graphic CRT,H0l'lE=0,0 in other
cåEes,S,l'lustoneni
Statistical
sraphicsin
SURVO ?6E0ITOR 16.4.$ge
1S.|lustonen!
$tatrstrcal
graphicsin
SURUI 76EDIT0R 16.ä.196e I
e.1.15.
LIi'IITS=11,1?,.,.L ll'lITti=L 1, L? , . . .
(in
PL0T operation{or natrix
dragrans TYFE=i'IATRIX) sPecr{iesthe
uFperlinits {or the
classess{ the
data va}ues Eathat the class i consists o{
valuesX: L(i-1){Xt=L(i).
tdhen
plotting the ceils
belofigingto class i t{ilI
be shadedaccording
to the ith
shadins speci{red bv SHADING.3,?.
S-catter diågrans PL0T {data) ,':.inagelinei
ohere
tlre
imageIinB
hastlre forfi "
XXX YYY SSSI " Plots a
Ecatter diagranof a
dataset
de{ined bva
0ATAspeci{ication {or the vari-
ablesin the
XXX and YYY columns.5SS
(optional) is a
naskfor the
narksof the
sbservationsin
thegnaph
(like
naneo{ the
observatianor
anindicator variable).
I (optional)'is a
nask{ot a nissing
valueindicator.
Charactens'gpåcg','0'
ånd'-' åle
codes{or the
misEing values,Flotiing is controlled
bythe following extra sPeci{ications
typedin the edit field:
XSCALE, YSCALE, XLABEL, YLABEL, P0INT, LINE; GRIDHEADER, TEXT, HOI'IE, 5IZE, XDIV, YDIU, FEN, FRAI'IE, CONTOUR' TREND.
PL0T {data) , +.x variEb lei
,'lv
variab le}nakes
å scatter
diagramo{ a
dataset
de{ined by a SATAspeci{icetion {or the variables {x
vaniable} and{v variable).
The
ertra Epecification åre the
samees
thosefor the
Previoug{orn
of PL0T{or scatter
diagrans.e.2.1.
XSCALEX$CALE=r,nin. vålue) ,.'?nd value) , r.3rd value) r . . .
" {.tr1sx. value)
specifieE the
scale onthe
Xaxis
andthe scale
labels.I+
XSCALErs not given, scaling
andlabetling rs
automatic' XSCALE=',scale type) , r.nin. veluei , {änd value) , ' . . ,';max. value}specifies a
nonlinear scale onthe
Xaxis
andthe scele
lebels-{scale type) is
aneo{ the alternatives
L0G, L0GIT, PR0BIT, S0F, EXP, ARCTAN.e.e.e.
YSCALEY$f,ALE={rnin. valuei ,':.änd value)
" *l3rd velue} , . , . , {.mår, veluei
specrfies the
scale onthe
Yaxis
andthe
Ecale labels.If
YSCALErs not givefi, scaling
andlabellrng is
autonetic.YSCALE:r:.gcå
le
type),.lmin. va lue), {2nd va luei, . . .,'.nax - va lue)speci{ies a
nonlinear Ecale onthe
Yaxis
andthe scale
labels.{scale type) is
oneof the alterneiives
L$G, LIGIT, FRIBIT, fiflR,EXP, ARCIAN.
2.4.3.
XLABELXLABf L =..str rn 9 .-t|| l-thou t.'Epac es)
gj.ves
a title ior the
Xarrs.pefault rs the
nameo{ the
varrable.iLReEL=- neåns
thåt the label rs onitted.
S.lluEtonen!
$tatisti.cal
sraphicsin
$URVO ?6EDiTOR 16,e.1981
gA;8.4.
YLABELy1-gggl
=.: str r n 9_withou t _spac es)
gives
a trtle for the
Yaxrs. Default is the
naneo{ the
variable.YLABEL=- neans
that the label is onitted.
2.e,5.
P0iNT P0 IN T=.;c harac t,er )speci{ies the
Eylnbol{or the
observationpoints in the
diagram.De{auIt,
is a
smallpoint.
A noreflexible
wayo{
narkingis
providedby
the
5SS nask onthe
inageline, 8.P.6.
LINELINE=*:.line type)
,.lline
thickness) ,{tine
label}.
speEifieEthe line
typeespecially in plstting tine series but
canalso
be usedin scatter
diagransto join
consecut,ive points.i+
LINEis
missing,the points are not joined
t,ogether uhenplotting a scatter
diagram.{Iine typei is
aninteger n=0,1,?,..,,1ä indicating the
brskeness n{the line
(n=0 meansa solid line).
.r.line
thickness) (optronall is
aninteger 1,?,3,...
De{ault=l.{Iine labeI) (optional) is a string uithout
spåcesto
be plotted asa lebel at the
endo{ the
tirneseries.
De{ault=no labet.4"e.7.
GRIpGRID=..X,Y
or
XY)draws
stnaight lineE parallel to the x-axis
(ERID=X)or the
y-axis{ERI0:Y)
or both
TGRID=XY) ihroughthe points indicaied
by XSCALE (TSCALE) and YSCALE, respectively.GRIO=,'.x Etep, ystep)
Horks as
the {inst
GRID,but
usesthe
stepsdxstep),{ystep)
shendrawrrg
the grid. I{ a.step
paraneteris
negative,orly a snall
tick is
draun insteado{ a line
segnent.e.e,8.
coNT0uRCONT0UR=epsl, eFgä, .
..
BINIJRtl=E {X },E (Y ),S(X ), 5(Y ),Corr (X,Y )determineE
ihe
contourellipses to
bepiotted
onlevels epsl,epse,...
on
the
basisof the
tuo-dimensional nornaldistribution
de{ined by a BIN0Ri{Epecr{ication. I{
BINORI'Iis
missing,the
parametersåre
estim- atedfron the ptotted data.
The parametersepsl,eps?,.., re{er to
theprobåbilities o{
an observationlyrng inside the ellipse.
Perticularly,
epgl=0 causesthe princlpål
axesto
beplotted.
Exanplel C0NT0UR=0,0.5,0.9,0.99 BINOR|i=O,0,1,1,0.70?
S.l'lustoneni
$tatrstrcal
sraphicEin
5URU0 76EDIT0R 16.e.198e
10e.e.9.
TRENoTREND=CL,EP',.. (at
nost5
parameterE)deternines
lines parallel to a lineer irend ta
beplott*d' If
thetrend is
Y=aX+b andthe residual
variancers sfe,
thenthe
lrnes t:61+[+f,s and Y=aX+b-Cs{or
C=f,I,CP,,.}rill
beplotted.
For exanplå,TREND=O causes
the trend itsel{ ts
bedraln.
Thetrend iE
estinrated bythe
(JLS method fromthe plotted deta,
However,i{
a BIN0RI'1speci{ica-
tion is
given (seee.e.g), the trend will
be computed åccsldingto
the correEponding binormaldistribution'
3.?;10. 0ther specificetions
HEADER (see
?,1,5i,
TEXT
(sEeä,1,6),
lHOt'lE
(see2.1.7),
SIZE
(see?.1.8), XOIU
(see?.1.9),
Y0Msee ä.1.9), PEN
(see 2.1.1?),FRAt'lE (see 2.1,13).
?,3.
Time seriesPL0T ideta)
,.linage line)
nhere
the
irnageline
hasthe
fonn" TTT YYY 5SS I
uplots the trne
senies YYYfron a
dateset
defined'bva
0ATAspeci{i- calion.
Thetine axis s,ill
belabelled
bytexts
aPPearingin the
TTTco lunn.
5$S
toptional) is a
naskfor the
menkso{ the
observation Pointsin the
graph (like the
nameesf the
obtErvationsor the
valueso{
anin- dicator variable).
I (optisnal) is e
mask{ar a
missing valueindicetor.
Characters'gpåce','0'
ånd'-' årå
codes{or the
misEing vålueg,Plottins is controlled
bythe
{ollouringextra sPeci{rratisns
tvpedin thp edit freld:
TSTEF, TSCALE, YSCALE, XLABEL, YLABEL, F0INT, LINE, GRID" HEADER, TEXT, HOI.IE, SIZE, XDIV, YDIV, F'EN, FRAI'IE, TRENO.2.3.1.
TSTEFTSTEF =.:.Iabe l
lrng
step) , ,imarking step)specifies the labels
åndthe
porntsto
be narked onthe trne
axis.{labelling stepi specifres the
gap betweenthe
TT'I labeIs end{rnarking
step} (optional) the
stEPfor the
sma}} marks anihe
axis.e.3.e.
TSCALETSCALE=.Ilist
of
TTT labels)speci{ies ihe labels to
beptotted
onthe tine axis.
TSCALE can be usedjoinily
r,rith TSTEPfor additional
mankings.S.1'lustaneni
$tatisti.cal
graphicsin
suRUO ?6EOITOR 16.e.198e
11ä,3,ii,
{Jtl-rpr sFecrfrcatinrrsThe f o l lowing specr{tcationE t+lot'k åF those
{or
scåt.ter dragråm$, YSCALT (Eeee"il,ä),
XLABTL (sep e"ä.i,i
), (de{ault iE
XLAFEL=TIl,1[) YLABTL ( Eee ?.?.4 ) ,P0INT
(Eeef;.e,5),
LINt
(Eee?.?.6i, (de{ault
rE l-INE=0,1,_)GRID
(see?.?.?),
TRtl'lD ( see ?.?..9 ) , HEAOER ( see e. 1.5 ) ,TEXT
( Eee e. 1.6 ) ,fiil i;;-
ä.1.1 ),SIZI
iEeee"1.8i,
XDIU
{seeI.1.9}, YDIU
(seee.1,9),
FEltl
i see ä, 1. lP i , FRAI'lt
i seeL
1. 1:i ) .gfilollit'e
on nornål e FL0T .ldata) ,,:imageline)
uhere
the
imageline
hasthe forn "
FFF tiSS" plots
on nornal probabi-lity
paperthe
FFFvariable
froma
dataset
de{rned bya
DATAspeci{r- cation.
The PFP colunnnust
be Eortedin
ascendrng order beforeplot- tins.
SSS
(optional) is a
nask{or the
marksof the
observationsin
the graph,- FiEtting
nay becontrolled
bythe
saneextra speci{ications
asin plottins scatter
diagrans (see?.?.)
Note
also the possibility of
usingthe probit
trans{ormation bythe speci{ications
XSCALE and YSCALE (seeä.?.1-2}.
?.5. Plottinq text
In addition to
HEADER and TEXTspecifications
(seep.1.5-6) text
nay be
plotted {reely
onthe
graphic screen by usingthe
PL0T oper-ation in the {orm
PL0T TEXT,Activatron af
FL[]T TEXT leadsto tlre displayl
COORDINATES:
X=
O,Y=
OPLOTTING TEXT:
SELECT: 0=STARTING
F0INT,
T=ENTER THE TEXT, RETURN(EXEC)=$T0F C;CHARACTERSIZE,
S=CHARACTER SFACING, F=FEN0n
the
graphic screenå
cupsoris blinking in the low-Ie{t
corner (coordinates l=S,Y=0) andit
can be movedin
stepso{ 5 p}otting
units bythe
arroul-headed F-i<eysor drrectly to a specific point
by pressing0
and enterrngthe
new coordinates.The
text to
beplatted is to
be entered and edrted by{rrst
pressrngT then by
typing
and/oredrtrns the tert
andfinally the tert
rsplotted
by preEsrns RETURN(EXIC)Ihe character Erze
(de{ault 1)
and spåcrng (de{.-lult 10"0) nay beset
byll
and$
respectrvely.S.flustonen!
Statistical
qråphicsin
5URV0 7bEDIT0R 16.e,15äe
1äAll selections
made bythe
user0rll
be dispiaved onthe
normal screenas
{ollowslCOOROINATES:
X=
1OO, Y= 4OO PLOTTING TEXT:SELECTT S=$TARTING
P0INT,
T=Ei'ITER TllE TEXT, RtTURI'IttXE[ i=$T0P C=CHARACTER5IlE,
$=Ci{ARACTER SFAIING, F=FENTCICIRDINATES OF THE STARTIHG FOINT
(X,f)?
1ÖO,4OO O,Ö tex tI
TeEl åä-ån å?fiå/.$!t*[I.IA RAI TE R $ I
ZT I
il$RIlfii'ITAL SF'AC
INt]-l
1*VIRTIIAL SPAI
ING?
OPTFN 1
$ince
all the
parameters[ån
be enteredrepeatedly'
severaltexts
nay beplotted
durrngthe
salneactivation o{
FL0T TEXT. 0bservethat
PEN
?
nay be usedfor
erasingtext
previouslv Plotted.Return back
to editorral
node takes pls'-e bv RETURN(EXE[).e"9.
Clrve+ ångAs seen
in P.8.8-9
somecurves, like
contourelliPses
and linesparallel to e llnear ttend,
nay beplotted direetly in
connpctionwith scatter
diagrams,To produce ilorE conplicated graphs
o{ analytic
curves,a
special fonnof the
PLOT operationis
available.The equetion
o{ the
curve can beuritten
accordingto the
uset'sown
notation either in the
{ornr PL0T Y(X)={unctiontX)or in the
parametric {orm FLoT X (T)={(T),y (T)=g(T)The
{unctisns
appearingin tl'e
FL0T operatxon måyinclude
symbolic parameters(pj., rho,
speed) whose values haveto
be gi.ven inthe
form {Farameter}=.lnunericvaluei
(Pi=:4.1416, rho=0.99, sPeed=?O)in the edit {ield.
In addition, at nost
two parameters Eån be given as cyclingparameters
in the
form{paraneter)=({irst value),{last
value),'isteP).Then
a
one-or
two-paraneterfanily o{
curveswill
beplotted in
the sane coordinate systen.The
plotting
åreåis specifred
bythe
XSCALE and YSCALEspecifr*
cations
(see?.2.1-2),
Thede{ault is
XSCALE=-10,0,10 YSCALT=-10,0,10.The
plotting
rångeis
givenin the torn X=';{irst value),':.Iåst
value},{step). I{..step) is noi given, l/100 o{ the plotting
rångeis
usedas (step). If the plotting
rangeis not given, the total
range given bv XSCALEwill
be used.In the
second {ormo{
PL0T abovethe
rangers
givenrn the
formT=.l{irst
value),.-last
value} , r.steP) .In
both {orns X and T can be replaced by ånyother letter or
ilord.S"l{ustonen:
$tatistical
gr,aphicsin
5URV0 76EDIT0R 16.e.1g8e lg
sone simple curve
plottine
schenesi (Theplsts are in the
appendix,)FL0T Y tX )=10*Stri{ tX }
HEA0ER=F*trg.lrgnp_ X:l
t-l.."lsr-J:1"d.*it.1
GRID=XYPL0T
Y(x)=xtn /
n=1,4,1HEA0ER=[.pnIgul
j.-iltere.Ft
foI
F=å,]Fr. ,-
lVo XLABEL=YearE GRID=XY XSIALE=0, 5, 10, 15,ä0',e5, :i0 YSCALT=0, 10, e0, i:0, 40,50,G0, ?0F =5, 15,
1
X =0, :;0, 1FL0T Y (X )=(1 +F' /100)+X
XSCALE=-I0, 0, 10 YSCALE=-IO, 0, 10 XDIV=l, 8,
I
Y0IV=l, 8,1
SIZE=500, 500 X=-10, tr 0, .0e5
HEADER=Y=100/ tX-5 ) / {X+5 )/X
GRI0=XYFLOT Y (X )=10fi1{X*5i/{X+5}/X
alllrrlrt
HEAOER=Contoqr
ellipses
XSCALE=-IO, 0, 10 YSCALE=-IO, 0, 10 XDIV=l, 8, 1 Y0IU=l, 8,
1
SIZE=500,500 s1=5 s?=3rho=0.9 t=0,6.?83ä
GRIO=XYeps=0.5,0.9,0.1
PL0T X ( t,)=sltEqr ( -ä* log ( 1-epE) )*cost t ),
Y ( t ) =sP* sqr ( -2* log ( l-ep s ) )*sin t t+arcsin ( rho ) )
HEADER
XSALE=-3, 0, 3, 6,
I
YSCALE=0,0.5 5ll[=]99,
400a=0,6,0.5
b=3s=l t=0.3 p=0.?
c=0.39894(=l/sqrtE*pi))
PLOT Y
(l
)-p*s/s*sr p ( -. 5* t tX-a ) /s ) fP ) + ( 1-p )nc./s*exp ( -.5* ( (X-b )/t)+p )H E A D E R =F''jU a h g 1.,*,t..$ åg+, n,gf ., f L r c-}g p XDIU=l, 8,
j.
YDIU=l,S,1
SIZE=500,500 T=0r6.1ffil
R=-lCI, 1ö,L
ind=0, 1,I
F'LtlT X {T i=Rrcil${ Ti+indxR, Y { T )=R*SIN t T
}+u-ind
irRAs seen
fron
tFre preceding eranples,the extra speci{ications
ofscatter
diagrans {seeE.?.1- )
can be usedin
curveplotting,
too.Thus
analytic
curves may beplotted
on åneårlier scatter
diagranor
ona tisre series plst.
s.l,tustonen!
statistical
graphicsin
$LRUO ?6EOITOR 16.P.1å8å
14In
curveplottins
soneaddrtional
specr{rcattong canalso
beenp loyed.
8.6.1. FILL,
YFILL, OFILL, IFILLr
rLl={.dendityi,r.intial value},t{inal
value}draws
line
segmentsparallel to the
Yaxis
{rsalpoints
onthe
cutveto the
Xaxis in
i,heinterval speci{ied
bvr'initial velue}
and*ifinal value). $e{ault iS the
wholeFlstting
rånge.{densitv)
(an integer1,?,3,..)
giVesthe
9åp betweenthe line
segments usingthe
curveplottins
steFas the unit.
YFILL={densrtv),'linitral value),'ifinal
valuei,";;;;'';;ir-;;;' j;;;;-;;";i
on*,e
curveto ihe
Y exis.0FllL*{density}
,'iintial
value} ,{.{inal
value}ir-"i-"it*tnative {orn a{
the FILLsPecification for'
curvesof
the{orn
X(T}=f(T),Y(T)=g(T) andioins the points
onthe
curveto
origofor
valuegqinitial value) {
T'i {{inal
value}'IFlLl={density},.iintiai
value}, {fina1. value)norlrs as $FILL
bgt ioins the points
anthe
curveto the intiai
pointof the
curve,ä.6.E.
ROTATIT]NR0TATI0N={an9le
in "},{x),';Y;
notates
fhe
graph by {anglein "}
usrngthe point {x}'{y}
as the centenof rotation. Default is
R0TATI0I'I=0,0,0.4.6,3. INTEöRAI
:INTE0RAL={constant}
{or
curveso{ the
{orrnY(X}*{{X}
rescalesthe
{unctiorr. be{oreplotting
sothat the integral o{ {tx) is
equalto {constant},
The rangesf in- tegration is the
5åne å5that {or plotting.
By using INTEGRAL=I, {or exåmplerdensity
{unctiohg can beplotted without giving ihe
cumber-sone corstants åPPeåring as
coefficients in the
{unction'e.6.4. Plsttine o{
anintegral
{unctionPL0T INTEGRAL Y(X)=f(X)
plots the integral
functrono{ {(x).
The range{or the integraiion
andplottrng is
givenin the forn
X={lotlerlimit),{upper linit}'
{step). If
theselirnits are not given,
x$cALE deternrnes then and 1/100of tlre the
rangEis
used as {step)Tlre
extra speci{ication
INTEGRAL (Eee2.6.3)
canalso
be emplovedin
connectionwith
FL0T INTEGRALthus pernritting plottrng
o{cunulative densrty
functions o{ probability distributions,
{orexEnp
le.
Furthernore, by using YSCALE=PRIB1Tr:.. (scale values)...
the
cunulatrvefunctions råy
beplotted
on nornalprobability
Påper.
S.l,lusionent
$tatistica:l
sraphicsin
$URW ?6E0ITttR 16.g.1gge $
REFERENCES
I'lustonen,
S.
(1980),Inieractive analysis in
SURV0 ?6, Proceedings in ComputetionalStatistics,
Ed.by l,l,|1.'Barritt and 0.tdishart, e53-e59, Fhysica-Uerlas, hlien.l{ustonen,
S.
(1980), SURU0 ?5 EDIT0R,a
newtoal {or interactive stat- i.stical
courputing,text
and data nenagenent, Reseårch Report No.19,
Dept.o{Statrstics,
Univer'sityo{
Helsinki,l'lugtonen,
S.
(1981), SURU0 ?6 EDITBR,a
nerttool {or interactive stat-
istical
computrng,text
and data nanagenent, (RELEA$E2),
Re-search Report No.24,
0ept.of Statistics,
Unrversrty o+ Helsinkr, llustonen,S.
(1981), SURVU T6 tDIT0R, Estrrnationo{
regression nodels,Research Report No.ä9, Dept.
of Statistics, University
o{He
lsrnki
flustonen,
S.
(1981),Statistical
conputingnith a text editor,
Conpu-tational Statlstics,
ed.by Herbert &ining and Feter Nåeve, 3e?-348,Helter
deGruyter, Berlin,
L
=,3
4 ::'
t=D
7a Lo9
J-r.
.Le .1-3
l-4r-5 i.6i-7 L€la9 eoe1 e&
a3
S.l{ustCInpn;
StatrEtrral gråpiirrs in
SURU0 16 [DIIUR 16. e " 198ä 1"6 NOTEThe PL0T operation has nou, been extended
to
producethree
dinren-sional
graphsof analytic
gur{acesin central proiection.
The actualgraph
r,rill consist o{ a proiection
ona
Plane orthogonaito the iine fron
EYEto origo.
The sur{ace can be defrnedin the
{ornPLST
Z(X,Y)*f,unctisntX'Y)
nrPLOT l( (T, U)={(T, U),Y (T, 1J)=9 (T, U), Z(T' U)=h(T' U).
The space cutves
characterizing the
surfaceare
selected by CURUESspeciflcations.
The graPh can be savedstep
bv stePin
theedit {ield
by usinga
PL0TLINEspecification
andit
nåv bp rePlotted bya
PLOT FILE operation.In replstting the speci{ication
EDIT mav be used{or editing sf
lhe graph. Theplot wrll
then åppe€r steP by step andth€
user nayedit the plotting
stepsvia the
keyboard.l- suRuo ?F EDIT|fR (C)19?9 sl't{ustoi€n (eloxl.oo)
*$f!6
E1p2* *
*PLoT z<X.Y)-?rtxP(
*
(-X*X-Y*Y, /? >:*
*X:-5,5, - P lbY:-5-
=. -?
FLgTL INE =B
*X -C URIIE !i'=-5 , 5 *o - 5
*Y -CURiUIE S=-5, 5, - 5
*xD IV=,O, a, o YD IV,=O, a, O SIZEry$lL, $,LL FRAHI*O
*PLoT FtLE,ExPa.B- / HoHE-,t'4oo
e u,ase,-råg o.-al-e D'-3.-t- u'-4'-? t'-1r-l- u'-g'-? u'-4'-a u'-4'- ru'-3'-eu'_4.-LU.-4'-aU.-a._au'-4.-eU.-3'-?D._4._1D'-4._eD
* D,-4.-e o,-a,-i o'-+'-e D' -4,-e 9.-1 '-1 9'-4'-e D'-"1 '-e D'-q'-? Ö + D,_4._e o._o._ä o.-o.-t- D,-ä.-e D'-4'-a D'-4.-e o,-5i*e o,-4.*e D
* O.-a,-a
*..,
o.-5.:? D'-4'-a D'-5'-e -tc-* ( P 1ot-i-j"ng *tcP* -f ttr edit'Lng, '
x l.ridd-n l.inaa åra Fanovcd aemiruton-ticållv)
f
$,l'iustonen
I
StatrsticaI
gråFhicEin
SURUCI ?6 tD I TfiR 16"1" 19ää 1?{ll[Illå:
Graphs seneratedtrith
SUftU0 76 EDIT0Rlhir
appendir presentsthe
usageo{ the
FLUT operation through examples.In
eaclro{ the {ollowing exhibits the
graphis
coupled witlran
extract fron the
edj"t{ield
completelv descr'ibing thB FLUT oper- etrorrsacirvated
arrdthe
neceEsaryattributes.
Thusa1l
theseplotting
schenes nay be
easrly
r'egenerated by 5URV0 76 EOITOR on an }Jang 2Q00inEtallation with
thE graphic CRTptotter
ä?8P. Furthernore,the
5URV0?6 EDITOR DEI'1fiNSTRATI0H
pletter carries
theseplotting
schenes(edit {rles
FL0T1,FLOTI,...i alnost
comPletely.l'lany
of the
exanplesare reiated to staiisticel
graPhicsto
sho$,how
pictures
can be used as anefficient t,ooi in
varis'us research andteaching
srtuatrons. 0{ rourse,
an immense amounto{
var'iantsrsuld
be derived{ron
some basic gr'apl'sor
ås cornbinationssf
standardalterna- tives.
Thereforethis
aFpendix cannot be complete,but
includeE only sonetypical statistical plots.
The reader having åccessts
SURV0 ?6 EDIT0R canpasily
generate nor'e exåmpies bynodifying the existing
ones and savehis solutions for
subseguentapplrcatron. In {act,
thePLOT operat,rsn has nov, beEn succeg{ully enployed
{ron
February 1981 onby several SURU0 ?6 users
Hithout wrrtten
docunenl,s onthe
basis"o{
arather restricted
sanpleo{
exanPles.Also sone
purely nathenaiical
curves and{anilies of
cutves serve åsillustration of
houto
use $URU0 ?6 EDIT0Rin non-statistical
apPlica-tions.
The appendix{inally
contains nore conplicated'artistic' plots
displaying the
pouerof the 'graphical
language'.It is inportant to
notethat
someof the
dynamic aspects, tlhich ap- pgår onthe
screen and arenost interestins in
måny cå5e5, cannot bedetected
fren the final
output on PaPer. Nevertheless we hoPethat
even these ready-made graphs can give an impressionof ihe passibili-
ties
available.S.i'tustonen;
Statrstrcal
gråFlircstn
SURVS ]16 tDIl0ft u I '| { I '.r r'|Å'ule L r -LJUL l- rfJ
L.,
{
HBAR D I fiGRfiH OF 14 ftLES
S,*rp d en
Denmö rk
F Ln I an d
Iceland
N o ru,ay
I 000 2000 300rj 4000 5 000
o-14n 1s z4ffi zs-44 ffi 4s-64ffi ds- W
e6e7 e8a9 303I 3A33 3435
3G3?
3B39
4CI4l- 4e43 44
* Tcr fr Xot å
* Bp oc L*lLcat.i-on L ar *u ##J-e .acn t 3
r.Lrnp I"r l-n tlrc b*r
ocfLtd La*p fi-eld,r rrr I a#ådarner {E
å ;rt d*#ånc E'Y å L'CI I
rlsts set) flLO T {nase ef
* *
*
t't A
*
It
*
E}:*
Slrr ed en
D enrnar Lc
F in l.and Ice l.and
N or.ga:z
O-t-4 .X-5-P4 e5-44 45--64 65-
€l4L 5?t- LLB€} 930 5Cl5
506 399 7a-7 464 eoe
3e ee 2,9 eo J.o
474 3J.6 53/0 44A, e5å
*DA TA HåLE S, A , El, l.l
*PLO T ITALE 5i
*
= A c tiwate, the PLO T oF €Fe tion crn lin n 4 Ö !
* *
5.1'lustCInen:
StatrEtrral
9räFhrc$rn
SURU{I 76 TDITSR 16, ä.19Sä
192
ZI]BåR
rt nn
1 t'tY
BO
60 40
4tr(tJ
0
D I ftGR f;I-1 OF 11 ftLES
S,*red en Denrna rk
Flnland Iceland
Nonuray5354 5555
o-1 4
n
15-24 m ?s-44ffi 4s-64ffi 6s- ffi
I
FURvp?F eorr i+ålx eor
rTYPE-,.VBAR
*PLOT ITALES*
*
S.l{ustoner:
Statrstical
sr'apl,ics r.n SURU0 ?6tDiT0R
1ö,ä"198ä lö
t- SpRr€, ?6 EDIT,OR (C tl-9?9 S-l'lu-ion.n (lerlr 80) 59*50 TPLOT }IALEsl-
6L *TYPE-II\,BAR
6e *HOI!E-O, O SrZE-?99,51-l-
€3 TLEGENO-ACE: HEåOER=Nurb.r ('+ ri-l-3 l-n v.Fi.rut rqe cFoult!3 (.1-oooJ 64r
3
Nurnber
1 ?ilff I 0f;0
8fi0
600
tnn
4UU
?00
of rnal.es in vörious äse sroups
(1000)5..r e d en Denrna r k Fl,nl"and
Iceland
NoruJay4
n ts*?4 ffi
25-44ffi
45-'54ffi 6s- W
f;GE
:
0.--l
$,1'lustonBii; ljLat,rEt.r.cal gråFhlt5 :.ti SURUil ?6 bSil0p. 16.;i " 198ä ä1
lt.l
unrber of lrrales in vörious öse sroups
{1000)S,*red en DenTnar.k
Flnland iceland
Nor'*,öy
&
1 000 2000 3000 400c 5 00c
fiGE
:
0-14n,t 5-?4 E
25-41ffi
45-64ffi 65- I
Nurnber
of fernales in variouE ase sroups
(1000)Sr*red en fenrnar'k
FLnland Iceland
N o nr*lay
I 000 20 00 3000
AGE
:
0-14n 15-?48
25*44ffi 45-64 ffi 65-
m+ r}URlrO-?6, qDJTOR (c,)l.979 S-ttuqtonrn (t-ear €o) ,. " . . 73*?/r iPLOT l{ALEEl / TYPE-HBAR HO| E-5o'P5O BIZE-?OO.a5O
?S } LEGEND-AGE:
?6 * HEADER-Nuilbcr of, n?ilrr .ar våraou. +or qFouDr ,(aOoO)
?? *-
?8 *PLoT FEI{ALES / TYPE*HEåR Ho}rt-so'O StzEr?oo'aso
?9 * LEGEND-AGE:
Etg t HEAAER
€|.a
*
AE TDATå FEIIALES,C,D,F
83 * Nunbqr.,o+ frF-rcE J+ogg):+n:XQE+9U. iF.l glJ'ount
84 F o-.a4 t5-e4 e5-a4 45-54 65-
Bs c s{rd.n Boo 546 tlea 953 7€o
€15 * D.nr-FL 539 35'' 7&' 554 a.a6
87 * Finlånd ag,i s8t 693 647 353
88 t lccl'ånd 3a aa eA ?O Le
99 D Ncru:Y /rsa 3Oa 50? 453 337
90 *- 91 r
4000 ) Ft\nitUUU
S. ilustonen
I
$lat,ist,tcåI
gråpfrirEin
SURV0 76 f D iTiiR .L\JTLT.l.JLTLt r t l r. t r-LF
ii
' DiHGRttll0F
l{tiLESS r*,e d en Denmö r.k
5
Flnland Iceland
l-l or.uåyo-1 4
n
1s-?4 ffi ?s*44ffi
4s--64ffi 6s- ffi
J. SURUt}
"6 TD ITOR
€7 aI ao
Lt
aer-3 L4
r5
,.6t,?
a€}
eo.L9
N+ ..
*DA Tå T.IALE S, A , E}, }I Ff j.r ',:O;1|4 L5-94 A Sirre.den ' '84t- 5?t- l1 Denurrrk 564 3AF
* F in l.an d sOG 39€)
* Icel.s.nd 3e A?, B ilorrlåy 4?4 3tg
*PLOT HåLE€i-
*
* TY$rE'aP IE
*
45-64 ,65;
930 s€rS
53? 3(}8 45€}' AOe 'eoto
q+å, e51 g5-.44
rl.BA
73.t-
'e€}
?e7sä{
* S I ZE.?9€t, EISO ,PlCltfE *O ' l.Elg
I T
S.l'lriEtonen:
litatrst,ical
graphtcstn
$URU0 76 f-DIItlR 16"ä.199ä Lul,1 rr'. 3U llo ?6, qqITpR (c).t9?9 9-l.lrr.!on.n (.looraoo,) - l
* --
*I}erA a.tALEa.å.Et,a{
t
6
67
E}
l.oI l-LL?
.L3L4 r.5L6 L7aa
a'l
A Sur ed en
* D e,nrnar k :tt F .an l'an d
* Ice'land El Nqrway
*
o-J,4 L5-94
€l4 J- 5?t 564 3Gt5 506 399
3e
ee 474 3J.6e5-44 45-€4 r-l.c}c} 930
?3:. 537 7e7 4€Gt e,9 ?o 534 44e,
65-sa5 30aeoe e5110
*FLOT FIALES_
* TYPE -UP It
* *
TPIE
DIfiGRAI4 OF |''1åLESS,*red en Den rilå r k