Skip to Main Content
SAS 9.4 Graph Template Language, 3rd Edition
book

SAS 9.4 Graph Template Language, 3rd Edition

by SAS Documentation
August 2014
Intermediate to advanced content levelIntermediate to advanced
652 pages
20h 38m
English
SAS Institute
Content preview from SAS 9.4 Graph Template Language, 3rd Edition
eval(collabel(cat));
layout overlay;
/* If cat and resp are numeric, then generate a scatter plot.
Otherwise, generate a bar chart. */
if (typeof(cat) = "N" and typeof(resp) = "N")
scatterplot x=cat y=resp;
else
/* If cat is a character column, then generate a vertical bar
chart. Otherwise, generate a horizontal bar chart. */
if (typeof(cat) = "C")
barchart category=cat response=resp / stat=mean;
else
barchart category=resp response=cat /
stat=mean orient=horizontal;
endif;
endif;
endlayout;
endgraph;
end;
run;
proc sgrender data=sashelp.cars template=plot;
dynamic cat="MPG_CITY" resp="TYPE";
run;
Note: See “Functions Defined Only in GTL” on page ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SAS 9.4 Language Reference, 6th Edition

SAS 9.4 Language Reference, 6th Edition

SAS Institute

Publisher Resources

ISBN: 9781629593111