Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.

Similar presentations


Presentation on theme: "Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks."— Presentation transcript:

1 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. SAS Graphics on ODS v9.2 Performance Enhancing Steroids Daniel O’Connor Systems Developer, SAS Institute Inc. Daniel O’Connor Systems Developer, SAS Institute Inc.

2 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Bar size 2048 Professional Athletes Accused of Abuse

3 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. ODS Styles  Colors  Fonts  Overall appearance  Theme  Symbols  Line Patterns Bar size 2048

4 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. SAS 9.2 Graphs honor Styles Bar size 2048 SAS 9.1SAS 9.2

5 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. SAS 9.2 Graphs honor Styles title "Perceived Harmfulness of Steroids"; footnote "Source: 2005 Monitoring the Future Survey."; goptions device=png hsize=3in vsize=3in border; proc gchart; axis1 label=none; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1; ;run;quit; Bar size 2048

6 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. GSTYLE Option Options >; Default: GSTYLE Graphs will automatically honor the active ODS Style for each output destination. Bar size 2048

7 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Default Styles

8 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Changing the Default Styles

9 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. How do ODS Styles effect my output?

10 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Overriding the Default Style title "Perceived Harmfulness of Steroids"; footnote "Source: 2005 Monitoring the Future Survey."; goptions device=png hsize=3in vsize=3in border; ods listing style= ; proc gchart; axis1 label=none; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1; ;run;quit;

11 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Creating your own style

12 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Creating your own style proc template; define style Styles.SGFImage; parent=Styles.science; style GraphBackground "Graph background attributes" / backgroundimage = "pillsLighten4.jpg"; end; run; ods listing style=SGFImage;

13 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Customizing your own style

14 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Gradient Colors style GraphBackground "Graph background attributes" / startcolor = cx4a495a endcolor = cx000000 gradient_direction = "YAxis"; style GraphData1 “Graph Data attributes” / startcolor=GraphColors("gcdata1") endcolor=cxd6deef gradient_direction="yaxis"; [ snip….] style GraphData8 “Graph Data attributes” / startcolor=GraphColors("gcdata8") endcolor=cxf7dee7 gradient_direction="yaxis";

15 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Free Type Font Engine

16 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Graphic Devices  DPI  Default Sizes  Orientation  Catalog Grseg  Image Type

17 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Default Graphic Devices

18 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Changing Graphic Devices  Options device=png  Goption device=png  Ods device=png

19 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Valid Image Formats

20 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Scalable Vector Graphics Device Driver

21 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Scalable Vector Graphics Device Driver goptions device=svg; title "Perceived Harmfulness of Steroids"; footnote "Source: 2005 Monitoring the Future Survey."; ods html file="Example5.html"; proc gchart; axis1 label=none; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1; run;quit; ods html close;

22 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. ODS Destination Interactions

23 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. ODS Destination Interactions ods html file=”SketchOutput.html” style=Sketch; ods pdf ” file=”BankerOutput.pdf” style=Banker; goptions hsize=3.25in vsize=3in border; proc gchart data=sashelp.class; vbar age; run; quit; ods pdf close; ods html close;

24 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Graphic Catalog Entries

25 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Altering the position and size of the graph  Hsize  Vsize  Horigin  Vorigin

26 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Managing Output with Multiple Columns

27 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Managing Output with Multiple Columns ods pdf file="Example7.pdf" columns=2; title "Perceived Harmfulness of Steroids"; footnote "Source: 2005 Monitoring the Future Survey."; axis1 label=none; proc gchart; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1;run;quit; proc gchart; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1;run;quit; ods pdf close;

28 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Managing Output with Multiple Rows

29 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Managing Output with Multiple Rows ods pdf file="Example8.pdf" Startpage=no; goptions vsize=5in; title "Perceived Harmfulness of Steroids"; footnote "Source: 2005 Monitoring the Future Survey."; axis1 label=none; proc gchart; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1;run;quit; proc gchart; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1;run;quit; ods pdf close;

30 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Managing Output with Multiple Rows & Columns

31 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Managing Output on a page ods pdf file="Example8.pdf" startpage=no columns=2; goptions vsize=5in border; axis1 label=none; proc gchart; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1;run;quit; proc gchart; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1;run;quit; proc gchart; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1;run;quit; proc gchart; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1;run;quit; ods pdf close;

32 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Customizing Date/Timestamp and Page Number

33 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Customizing Date/Timestamp and Page Number proc template; define style Styles.Pageno; parent=Styles.Printer; class BodyDate / vjust=Bottom just=Right; class Pageno / vjust=Bottom just=Center; end; run; ods pdf file="Example8.pdf" startpage=no style=Pageno; [ same as previous graph code] ods pdf close;

34 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Managing your Output Width ODS LAYOUT  Gridded  Absolute

35 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Managing Output with ODS Gridded Layout

36 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Managing Output with ODS Gridded Layout ods layout start columns=2; ods region width=4in; proc gchart; axis1 label=none; vbar year / width=12 outside=sum sumvar=response discrete maxis=axis1 raxis=axis1;run;quit; ods region; proc print;run; ods layout end;

37 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. ODS Gridded Layout Syntax: ODS LAYOUT START Columns = Width = Height = Row_span = Column_span = > ; ODS REGION Height = Row_span = Column_span = > ; ODS LAYOUT END;

38 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. ODS Absolute Layout

39 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. ODS Absolute Layout ods layout start width=7in height=10in; ods region height=3in width=3in x=0in y=.5in; proc print data=sashelp.class(obs=5);run; ods region height=3in width=3in x=5in y=.5in; ods pdf text='~{style [font_size=28pt]To the left is a PROC …}'; ods region height=3in width=3in x=0in y=3.5in; ods pdf text='~{style [font_size=28pt]To the right is a PROC …}'; ods region height=3in width=3in x=5in y=3.5in; proc sgplot data=sashelp.class; scatter x=height y=weight /group=age;run; ods region height=3in width=3in x=0in y=8in; proc gchart data=sashelp.class; vbar age; run;quit; ods region height=3in width=3in x=5in y=8in; ods pdf text='~{style [font_size=28pt]To the left is a PROC...}'; ods layout end;

40 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. ODS Absolute Layout Syntax: ODS LAYOUT START Y = Width = Height = > ; ODS REGION Y = Width = Height = > ; ODS LAYOUT END;

41 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. ODS Graphics  Automatic Graphic Creation  Graph Template Language  New SAS/GRAPH Procedures  ODS Graphics Editor

42 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Automatic Graphic Creation ods graphics on; /* bread and butter timeseries analysis graphics; */ proc timeseries data=sashelp.workers out=_NULL_ plot = all print=all; id date interval=month; var electric masonry; run;

43 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Automatic Graphic Creation

44 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Automatic Graphic Creation

45 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Graph Template Language (GTL)  Proc Template  Sophisticated Analytical Graphs

46 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Automatic Graphic Creation ods graphics on; ods trace on; /* bread and butter timeseries analysis graphics; */ proc timeseries data=sashelp.workers out=_NULL_ plot = histogram print=all; id date interval=month; var electric masonry; run;

47 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Automatic Graphic Creation

48 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Automatic Graphic Creation BeginGraph; EntryTitle TITLE; Layout Overlay / XAxisOpts=(label="Series" linearopts=( tickvalueformat=BEST12.)) yaxisopts=(label="Percent"); Histogram SERIES; DensityPlot SERIES / LegendLabel="Normal" name="Normal"; DensityPlot SERIES / Kernel () LegendLabel="Kernel" name="Kernel“ lineattrs=GRAPHFIT2; DiscreteLegend "Normal" "Kernel" / across=1 location=inside autoalign=(topright topleft top); EndLayout; EndGraph;

49 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. SAS/GRAPH Procedures  SGPLOT  SGSCATTER  SGPANEL  SGRENDER

50 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Heat Map (SGPLOT)

51 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Heat Map proc sgplot data=heatmap; scatter x=make y=type / group=group markerattrs=(size=.28in symbol=squarefilled); run;

52 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Paneled Plots (SGPanel)

53 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Paneled Plots (SGPanel) proc sgpanel data=cancer; panelby race sex / columns=5 layout=lattice novarname uniscale=column; hbar cause / response=incidence; colaxis grid label='Incidence per 100,000 People'; rowaxis grid label=' '; run;

54 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Stacked Band Plots (SGPLOT)

55 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Butterfly Plots (SGPLOT)

56 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Paneled Butterfly Plots (SGPANEL)

57 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. More Paneled Plots

58 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Papers / Classes of Interest  Himesh Patel  Pat Berryman  Bob Rodriguez  Sunday – ODS Layout  Sunday – Stat  Friday – ODS Statistical Graphics  Eric Gebhart  Scott Huntley  Dan O’Connor  Jeff Cartier?  Sanjay Matange

59 Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.


Download ppt "Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks."

Similar presentations


Ads by Google