Example: tourism industry

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.

procedure output. With PROC TEMPLATE, the Graph Template Language, and PROC SGRENDER, you can create custom graphs by using a powerful and detailed syntax. This tip sheet presents the most common procedures, statements, and options that are used to create graphs with ODS Graphics and SAS® 9.4.

Tags:

  Sheet, Template, Graphics, Tip sheets, Ods graphics tip sheet

Information

Domain:

Source:

Link to this page:

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

Other abuse

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.

2 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;. 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.

3 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. With ODS Graphics , statistical requests, and plot options vary across procedures.

4 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.)

5 <.. 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. 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).

6 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= ;. following statement: graphs. matrix _numeric_ /. proc sgplot <options>.

7 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>.

8 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. 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>.

9 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>.

10 Histogram var / <options>;. title 'Student Weight by Student Height';. 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.


Related search queries