SlideShare a Scribd company logo
1 of 9
Plot procedure
      3/28
Syntax
PROC PLOT <option(s)>;
     BY <DESCENDING> variables;
     PLOT plot-request(s) </ option(s)>;
RUN;
Syntax
PROC PLOT <option(s)>;
        BY <DESCENDING> variables;
        PLOT plot-request(s) </ option(s)>;
RUN;
Example
data example1;               proc plot;
do i=1 to 200;                      title 'this is an example';
        x=10*rannor(100);           title2 'x vs y';
        y=x+10*rannor(3);           plot x*y;
        if i<100 then g=0;          by g;
                else g=1;    run;
        output;
end;
drop i;
;
Options for plot
proc plot;
title 'this is an example';
title2 'x vs y';
plot x*y;
plot x*y/box;
plot x*y/box vaxis=0 5 10 15 20 haxis=by 3;
run;
Options for plot: box
proc plot;
title 'this is an example';
title2 'x vs y';
plot x*y;
plot x*y/box;
plot x*y/box vaxis=0 5 10 15 20 haxis=by 3;
run;
Options for plot: axis
proc plot;
title 'this is an example';
title2 'x vs y';
plot x*y;
plot x*y/box;
plot x*y/box vaxis=0 5 10 15 20 haxis=by 3;
run;
Sas plot

More Related Content

What's hot (20)

Tu1
Tu1Tu1
Tu1
 
Stack using Linked List
Stack using Linked ListStack using Linked List
Stack using Linked List
 
Primer Punto
Primer PuntoPrimer Punto
Primer Punto
 
20170127 tokyoserversideswiftmeetup資料
20170127 tokyoserversideswiftmeetup資料20170127 tokyoserversideswiftmeetup資料
20170127 tokyoserversideswiftmeetup資料
 
Komputer Grafik
Komputer GrafikKomputer Grafik
Komputer Grafik
 
week-16x
week-16xweek-16x
week-16x
 
งานPop pornapa
งานPop pornapaงานPop pornapa
งานPop pornapa
 
Vcs8
Vcs8Vcs8
Vcs8
 
StackArray stack3
StackArray stack3StackArray stack3
StackArray stack3
 
Snake.c
Snake.cSnake.c
Snake.c
 
ARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lectureARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lecture
 
Quinto Punto Parte B
Quinto Punto Parte BQuinto Punto Parte B
Quinto Punto Parte B
 
Mauro yaguachi
Mauro yaguachiMauro yaguachi
Mauro yaguachi
 
Circular queue
Circular queueCircular queue
Circular queue
 
C program to implement linked list using array abstract data type
C program to implement linked list using array abstract data typeC program to implement linked list using array abstract data type
C program to implement linked list using array abstract data type
 
Burrowing through go! the book
Burrowing through go! the bookBurrowing through go! the book
Burrowing through go! the book
 
Transducers
TransducersTransducers
Transducers
 
Assignment 3
Assignment 3Assignment 3
Assignment 3
 
Algo
AlgoAlgo
Algo
 
CL metaprogramming
CL metaprogrammingCL metaprogramming
CL metaprogramming
 

Viewers also liked

Utility Procedures in SAS
Utility Procedures in SASUtility Procedures in SAS
Utility Procedures in SASguest2160992
 
CLINICAL STUDY REPORT - IN-TEXT TABLES, TABLES FIGURES AND GRAPHS, PATIENT AN...
CLINICAL STUDY REPORT - IN-TEXT TABLES, TABLES FIGURES AND GRAPHS, PATIENT AN...CLINICAL STUDY REPORT - IN-TEXT TABLES, TABLES FIGURES AND GRAPHS, PATIENT AN...
CLINICAL STUDY REPORT - IN-TEXT TABLES, TABLES FIGURES AND GRAPHS, PATIENT AN...Angelo Tinazzi
 
Base SAS Statistics Procedures
Base SAS Statistics ProceduresBase SAS Statistics Procedures
Base SAS Statistics Proceduresguest2160992
 
Learn SAS Programming
Learn SAS ProgrammingLearn SAS Programming
Learn SAS ProgrammingSASTechies
 
Non linear kinetics
Non linear kineticsNon linear kinetics
Non linear kineticsSujit Patel
 

Viewers also liked (9)

Utility Procedures in SAS
Utility Procedures in SASUtility Procedures in SAS
Utility Procedures in SAS
 
CLINICAL STUDY REPORT - IN-TEXT TABLES, TABLES FIGURES AND GRAPHS, PATIENT AN...
CLINICAL STUDY REPORT - IN-TEXT TABLES, TABLES FIGURES AND GRAPHS, PATIENT AN...CLINICAL STUDY REPORT - IN-TEXT TABLES, TABLES FIGURES AND GRAPHS, PATIENT AN...
CLINICAL STUDY REPORT - IN-TEXT TABLES, TABLES FIGURES AND GRAPHS, PATIENT AN...
 
Base SAS Statistics Procedures
Base SAS Statistics ProceduresBase SAS Statistics Procedures
Base SAS Statistics Procedures
 
Sas Plots Graphs
Sas Plots GraphsSas Plots Graphs
Sas Plots Graphs
 
Learn SAS Programming
Learn SAS ProgrammingLearn SAS Programming
Learn SAS Programming
 
Non linear kinetics
Non linear kineticsNon linear kinetics
Non linear kinetics
 
Data Analyst - Interview Guide
Data Analyst - Interview GuideData Analyst - Interview Guide
Data Analyst - Interview Guide
 
Introduction to Modeling
Introduction to ModelingIntroduction to Modeling
Introduction to Modeling
 
SAS basics Step by step learning
SAS basics Step by step learningSAS basics Step by step learning
SAS basics Step by step learning
 

More from WenSheng Chang (15)

futureNo52
futureNo52futureNo52
futureNo52
 
Sas reg multi
Sas reg multiSas reg multi
Sas reg multi
 
Sas reg simple
Sas reg simpleSas reg simple
Sas reg simple
 
Sas corr
Sas corrSas corr
Sas corr
 
1129 sas實習課
1129 sas實習課1129 sas實習課
1129 sas實習課
 
Sas tutorial 1018
Sas tutorial 1018Sas tutorial 1018
Sas tutorial 1018
 
Sas tutorial 0524
Sas tutorial 0524Sas tutorial 0524
Sas tutorial 0524
 
Sas tutorial glm2
Sas tutorial glm2Sas tutorial glm2
Sas tutorial glm2
 
Sas tutorial glm1
Sas tutorial glm1Sas tutorial glm1
Sas tutorial glm1
 
Regression ci
Regression ciRegression ci
Regression ci
 
SAS 0412
SAS 0412SAS 0412
SAS 0412
 
Sas tutorial 0308
Sas tutorial 0308Sas tutorial 0308
Sas tutorial 0308
 
Sas tutorial 0308
Sas tutorial 0308Sas tutorial 0308
Sas tutorial 0308
 
0925 sas實習課
0925 sas實習課0925 sas實習課
0925 sas實習課
 
Science p79 -- polished
Science p79 -- polishedScience p79 -- polished
Science p79 -- polished
 

Sas plot

  • 2. Syntax PROC PLOT <option(s)>; BY <DESCENDING> variables; PLOT plot-request(s) </ option(s)>; RUN;
  • 3. Syntax PROC PLOT <option(s)>; BY <DESCENDING> variables; PLOT plot-request(s) </ option(s)>; RUN;
  • 4. Example data example1; proc plot; do i=1 to 200; title 'this is an example'; x=10*rannor(100); title2 'x vs y'; y=x+10*rannor(3); plot x*y; if i<100 then g=0; by g; else g=1; run; output; end; drop i; ;
  • 5.
  • 6. Options for plot proc plot; title 'this is an example'; title2 'x vs y'; plot x*y; plot x*y/box; plot x*y/box vaxis=0 5 10 15 20 haxis=by 3; run;
  • 7. Options for plot: box proc plot; title 'this is an example'; title2 'x vs y'; plot x*y; plot x*y/box; plot x*y/box vaxis=0 5 10 15 20 haxis=by 3; run;
  • 8. Options for plot: axis proc plot; title 'this is an example'; title2 'x vs y'; plot x*y; plot x*y/box; plot x*y/box vaxis=0 5 10 15 20 haxis=by 3; run;