24.04.2014 Views

Pratique de Sas Windows ...9.3 Volume 2 - Ined

Pratique de Sas Windows ...9.3 Volume 2 - Ined

Pratique de Sas Windows ...9.3 Volume 2 - Ined

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

proc template;<br />

<strong>de</strong>fine style boxG;<br />

parent=styles.<strong>de</strong>fault;<br />

class graphcolors /<br />

'gdata' = cxB3D2B3<br />

'gcdata' = cx588458 ;<br />

*class graphdata<strong>de</strong>fault /<br />

color=cxff0000;<br />

end;<br />

run;<br />

ods pdf style=boxg<br />

file="d:\notes\test\modifG1.pdf";<br />

title; footnote;<br />

proc boxplot data=a.ms212 ;<br />

plot taille*sexe / boxstyle=schematic<br />

horizontal;<br />

inset min mean max std<strong>de</strong>v /<br />

hea<strong>de</strong>r = 'Boxplot avec Statistiques'<br />

pos = tm;<br />

run;<br />

ods pdf close;<br />

On remarquera que <strong>Sas</strong> donne la possibilité, par l’option cfillbox=variable <strong>de</strong> l’instruction plot, <strong>de</strong> définir par<br />

les données la couleur par catégorie.<br />

Tous les attributs ne sont cependant pas modifiables par la métho<strong>de</strong> Graphdata1-n , comme le montre cette<br />

discussion sur le type <strong>de</strong> ligne et l’épaisseur : https://communities.sas.com/message/154063#154063<br />

Par la métho<strong>de</strong> <strong>de</strong> modification GTL, cela aurait donné :<br />

proc template;<br />

<strong>de</strong>fine statgraph bxplot;<br />

begingraph;<br />

entrytitle "Boxplot avec Statistiques";<br />

layout overlay;<br />

boxplot y=taille x=sexe<br />

/fillattrs=(color=lightgreen)<br />

spread=true;<br />

endlayout;<br />

endgraph;<br />

end;<br />

run;<br />

proc sgren<strong>de</strong>r data=a.ms212<br />

template=bxplot;<br />

label type="Sexe";<br />

run;<br />

L’exemple du co<strong>de</strong> GTL vient directement du<br />

manuel <strong>Sas</strong> 9.3 GTL reference 3èmeEd Chapitre<br />

20 page 214<br />

Bien sûr, le graphique est plus simple et orienté<br />

verticalement.<br />

Pour creuser cette filière, jetez un œil sur http://www.scsug.org/wp-content/uploads/2012/11/Greg-Stanek.pdf<br />

« Nesting Multiple Box Plots and BLOCKPLOTS using GTL and Lattice Overlay»<br />

191 INED Service Informatique Wielki

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!