Example: bankruptcy

ODS Graphics Tip Sheet - SAS

ODS Graphics Tip Sheet SG Procedure Notes Modifying Your Graphs Statistical Graphics procedures use the following: Although ODS Graphics is designed to automate the creation of high-quality statistical Graphics , on standard TITLE, FOOTNOTE, BY, LABEL, occasion you might need to modify your graphs. You ODS Graphics FORMAT, and WHERE statements For more information, see the following: can make permanent changes by modifying the ODS Graphics statement for image name, Basic ODS Graphics Examples graph template. You can make immediate, ad hoc image type, and size Tip Sheet changes by using the ODS Graphics Editor, which ODS destination statement for output type p/ provides a point-and-click interface. You can enable (HTML, PDF, etc.), style, and image resolution editing with this command: Advanced ODS Graphics Examples Statistical Graphics procedures do not use the ods listing sge=on.

ODS Graphics remains enabled until you disable it with the following statement: ods graphics off; < The ODS destination specifies where you see your graphs. A graph template determines how a specific graph is constructed. A graph template is a SAS

Tags:

  Sheet, Graphics, Ods graphics tip sheet

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of ODS Graphics Tip Sheet - SAS

1 ODS Graphics Tip Sheet SG Procedure Notes Modifying Your Graphs Statistical Graphics procedures use the following: Although ODS Graphics is designed to automate the creation of high-quality statistical Graphics , on standard TITLE, FOOTNOTE, BY, LABEL, occasion you might need to modify your graphs. You ODS Graphics FORMAT, and WHERE statements For more information, see the following: can make permanent changes by modifying the ODS Graphics statement for image name, Basic ODS Graphics Examples graph template. You can make immediate, ad hoc image type, and size Tip Sheet changes by using the ODS Graphics Editor, which ODS destination statement for output type p/ provides a point-and-click interface. You can enable (HTML, PDF, etc.), style, and image resolution editing with this command: Advanced ODS Graphics Examples Statistical Graphics procedures do not use the ods listing sge=on.

2 Following: p/ This tip Sheet collects frequently used information in one place so you don't have to search through SAS/GRAPH AXIS, LEGEND, NOTE, SYMBOL, PATTERN, and GOPTIONS statements PLOTS= Option For complete information, see the SAS the online documentation. It also gives you documentation at examples to take home and try. Each statistical procedure that supports ODS. ODS Graphics has no connection to traditional Graphics has a PLOTS= option that you can use to device-based GRSEG Graphics infrastructure. ODS Graphics is an extension of ODS (the Output select graphs and specify options. The PLOTS=. Delivery System). ODS manages procedure output option has a common overall syntax for all statistical and displays it in a variety of destinations, such as SAS Windowing Environment procedures, but the specific global plot options, plot HTML and RTF.

3 With ODS Graphics , statistical requests, and plot options vary across procedures. procedures produce integrated output that includes If you are using the SAS windowing environment, The syntax is as follows: both graphs and tables. Procedures that support view your graphs in the HTML destination. ODS Graphics create graphs, some by default and PLOTS <(global-plot-options)>. some when you specify procedure options. <= plot-request <(options)>>. Output Destinations PLOTS <(global-plot-options)>. Three Base SAS statistical Graphics procedures <= (plot-request <(options)>. Use ODS statements to open and close destinations: (SGPLOT, SGSCATTER, and SGPANEL) use ODS. <.. plot-request <(options)>>)>. Graphics and provide a convenient syntax for ods html <options>; creating a variety of graphs from raw data or from Here are some examples: ods listing <options>; procedure output.

4 With PROC TEMPLATE, the ods pdf <options>; Graph Template Language, and PROC SGRENDER, plots=all ods rtf <options>; you can create custom graphs by using a powerful plots=none ods document <options>; and detailed syntax. plots=residuals plots(only)= residuals This tip Sheet presents the most common plots(unpack)=diagnostics procedures, statements, and options that are used plots=diagnostics(unpack). to create graphs with ODS Graphics and SAS plots=residuals(smooth). plots=(trace autocorr). plots(unpack). Most graphical details are controlled either by graph templates or by styles, not by the PLOTS= option. ODS Graphics Tip Sheet ODS Graphics Overview PROC SGPLOT PROC SGSCATTER SG Procedure Examples You can enable ODS Graphics by specifying the PROC SGPLOT creates single-cell plots. PROC SGSCATTER creates a rectangular display of proc sgscatter data=.

5 Following statement: graphs. matrix _numeric_ /. proc sgplot <options>;. band x=x-var upper=u-var lower=l-var / diagonal=(kernel histogram);. ods Graphics on; proc sgscatter <options>;. <options>; run;. compare y=y-var-list x=x-var-list / <options>;. ODS Graphics remains enabled until you disable it block x=x-var block=block-var / <options>;. bubble y=y-var x=x-var block=b-var / <options>; matrix var-list / <options>;. with the following statement: density var / <type=type> <options>; plot y-var * x-var / <options>;. ods Graphics off; dot var / <response=r-var> <stat=stat> run;. <options>;. The ODS destination specifies where you see dropline y=y-var | x=x-var / <options>;. ellipse y=y-var x=x-var / <options>;. PROC SGPANEL. your graphs. A graph template determines how a specific fringe var / <options>; PROC SGPANEL creates a matrix of graphs, with one gradlegend <name> / <options>; graph for each combination of levels of a list of graph is constructed.

6 A graph template is a SAS. [hv]bar var / <response=r-var> <stat=stat> classification variables. program written in the Graph Template <options>;. Language (GTL) that provides instructions for [hv]barbasic var / <options>;. creating the graph. [hv]barparm <category=c-var> proc sgpanel <options>;. An ODS style controls the overall appearance of <response=r-var> / <options>; panelby var-list / <options>;. the graph. [hv]box var / <category=c-var> <options>; many-proc-sgplot-statements A style template is a program that sets the heatmap y=y-var x=x-var / <options>; run;. colors, fonts, and overall appearance of the heatmapparm y=y-var x=x-var graph. colorgroup=c-var / <options>; SG Procedure Examples highlow y=y-var x=x-var Example Statements and Options high=h-var low=l-var / <options>;. histogram var / <options>;. title 'Student Weight by Student Height'.

7 Proc sgplot data= noautolegend;. ods trace output notes; /* trace output in log */ [hv]line var / <response=r-var> <stat=stat> pbspline y=weight x=height; title 'Cars by Make';. <options>; run;. ods Graphics on /* enable ODS Graphics */ proc sgpanel data= ;. inset inset-text / <options> ;. reset=all /* reset all options */ panelby make / rows=2 columns=3;. keylegend names / <options>;. antialias=on /* cleaner edges */ loess y=y-var x=x-var / <options>; scatter x=mpg_city y=mpg_highway;. antialiasmax=1000 /* max antialias points */ needle y=y-var x=x-var / <options>; run;. height= /* default image height */ pbspline y=y-var x=x-var / <options>;. width= /* default image width */ refline value / axis=x|y <options>;. imagename='graph'; /* image name prefix */ reg y=y-var x=x-var / <group=g-var>. ods html /* open HTML destination */ <degree=d> <options>.

8 Path='C:\mydir' /* HTML and images path */ scatter y=y-var x=x-var / <options>;. (url=none) /* all can move together */ series y=y-var x=x-var / <options>;. file=' ' /* filename for HTML */ step y=y-var x=x-var / <options>;. image_dpi=300 /* image resolution */ styleattrs options;. symbolchar name=identifier style=HMTLBlue; /* output style */. char='hex-string'x | keyword / <options>;. proc reg plots=all; /* create all graphs */ symbolimage name=identifier model weight = height; image='file' / <options>;. quit; text y=y-var x=x-var text=t-var / <options>;. ods _all_ close; /* close all destinations */ vector y=y-var x=x-var / <options>;. waterfall category=c-var response=r-var / <options>;. [xy]axis<2> options;. run.


Related search queries