PROC GPLOT GPLOT is used to make two dimensional scatter-plots. General Syntax: proc gplot data=data-set options; plot y-variable*x-variable/options; run;

Slides:



Advertisements
Similar presentations
The Web Wizards Guide to HTML Chapter Six Tables.
Advertisements

Summary Statistics/Simple Graphs in SAS/EXCEL/JMP.
Working with Profiles in IX1D v 3 – A Tutorial © 2006 Interpex Limited All rights reserved Version 1.0.
Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Chapter 3 – Web Design Tables & Page Layout
Data TablesData Tables Organize data. Neat rows and columns. A place to record data. Communicate to others. Show relationships. Each data item represents.
Internet Basics & Way Beyond!
Step-by-Step: Adjust a Chart Axis USE the Pricing Final presentation that is still open from the previous exercise. 1.Click the chart on slide 2 to select.
Using ODS Regions to Create Custom Reports Kate Morrow, M.S. Statistician Vermont Oxford Network, Burlington, VT.
Mathematics for Economics and Business Jean Soper chapter one Functions in Economics 1.
Unwrapping the Unit Circle. Essential Question: What are the graphs of the sine and cosine functions? Enduring Understanding: Know the characteristics.
Microsoft Excel 2003 Illustrated Complete A Worksheet Formatting.
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 12 Spreadsheets and Business Graphics: Facts and Figures.
Introduction to Excel 2007 Part 1: Basics and Descriptive Statistics Psych 209.
SPSS Statistical Package for the Social Sciences is a statistical analysis and data management software package. SPSS can take data from almost any type.
Creating Web Page Forms
Notes Ch. 12—Creating Tables Web Page Design. Why Use Tables? Tables are used to create a variety of items such as calendars, charts, and spreadsheets.
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
Frequency Distributions and Graphs
The gchart Procedure The gchart Procedure is used to create bar charts of various types (it can also create pie charts. It’s most basic form would look.
CHAPTER 11 Tables. How Are Tables Used Data Display  Very tidy and very useful Better Text Alignment  Putting text in tables allows you to format indents.
Charts and Graphs V
STATISTICAL GRAPHS.
CO1552 – Web Application Development Lists, Special Characters, and Tables.
CGMB214: Introduction to Computer Graphics
Computers: Tools for an Information Age Chapter 12 Spreadsheets and Business Graphics: Facts and Figures.
Microsoft Office Illustrated Introductory, Premium Edition A Worksheet Formatting.
Microsoft Office XP Illustrated Introductory, Enhanced A Worksheet Formatting.
Header (unit) 1) Vertical. Your data table should have columns at the top and the data should be underneath the columns. The data table should not be horizontal.
Quantitative Skills 1: Graphing
Introduction to SAS Essentials Mastering SAS for Data Analytics Alan Elliott and Wayne Woodward SAS ESSENTIALS -- Elliott & Woodward1.
Excel Worksheet # 5 Class Agenda Formulas & Functions
Microsoft Office Excel 2003 Tutorial 3 – Developing a Professional-Looking Worksheet.
Chapter 9 Creating and Designing Graphs. Creating a Graph A graph is a diagram of data that shows relationship among a set of numbers. Data can be represented.
Computers Are Your Future © 2006 Prentice-Hall, Inc.
Microsoft Office Illustrated Introductory, Premium Edition with Charts Working.
Copyright © 2001 by Wiley. All rights reserved. Chapter 11: Using Visual Basic to Create Graphics Scale Method Line Method Line Charts Bar Charts Pie Charts.
XP New Perspectives on Microsoft Word 2002 Tutorial 31 Microsoft Word 2002 Tutorial 3 – Creating a Multiple-Page Report.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
Acute angle An angle with a measure less than 90 degrees.
Microsoft ® Office Excel 2007 Working with Charts.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 2 Graphics Programming with C++ and the Dark GDK Library Starting.
Introduction to SAS/Graph 9.2 Ken Barz Colorado Prevention Center 22Oct2009 Ken Barz Colorado Prevention Center.
Graphs in Physics PowerPoint #4. A graph is… A convenient way to show data.
Advanced Stata Workshop FHSS Research Support Center.
Tables in HTML. Table Tag HTML tables always begin and end with a table tag. Syntax:
Formatting WorksheetsFormatting Worksheets Lesson 7.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 5: Working with Tables Kelly L.
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
Statistical Graphics for the SAS System Computing for Research I 01/29/2014 Nathaniel L Baker.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. a lesson approach Microsoft® Excel 2010 © 2011 The McGraw-Hill Companies,
Effective SAS greplay’ing and how to avoid stretching By David Mottershead Senior Programmer, Quanticate.
CRSD Technology Training Tony Judice. Quick Access Toolbar – can be modifiedSave as… allows you to save the file to a different location and also as an.
Microsoft® Excel Use the Chart Tools Design tab. 1 Use the Chart Tools Layout and Format tabs. 2 Create chart sheets and chart objects. 3 Edit.
Lesson 6 Formatting Cells and Ranges. Objectives:  Insert and delete cells  Manually format cell contents  Copy cell formatting with the Format Painter.
Key Applications Module Lesson 14 — Working with Tables Computer Literacy BASICS.
SAS/GRAPH The Basics. Today’s Topics GOPTIONS GPLOT GCHART GCONTOUR G3D.
Spreadsheet Vocabulary Multimedia Lab Kathleen Pape.
STROUD Worked examples and exercises are in the text 1 STROUD Worked examples and exercises are in the text Programme F4: Graphs PROGRAMME F4 GRAPHS.
2003 HYPACK MAX Training Seminar1 Sample ADCP 112 – Computing Flow Quantities in ADCP Profile The ADCP Profile program displays color- coded flow data.
Microsoft Office XP Illustrated Introductory, Enhanced With Charts Working.
(Unit 6) Formulas and Definitions:. Association. A connection between data values.
Chapter 8: ODS Graphics ODS graphics were not available prior to SAS 9.2 They have been implemented across a wide range of procedures Functionality isn’t.
Bar Graph A bar graph uses vertical or horizontal bars to display numerical information.
Microsoft Office Illustrated Introductory, Windows XP Edition
Computing for Research I 01/26/2011 N. Baker
Graphing Data jgt.
Plotting Signals in MATLAB
Presentation transcript:

PROC GPLOT GPLOT is used to make two dimensional scatter-plots. General Syntax: proc gplot data=data-set options; plot y-variable*x-variable/options; run; quit;

Multiple Plot Calls in a Plot Statement Multiple y-variable*x-variable calls are permitted in a plot statement, each generating a separate plot by default. In the PROC GPLOT statement the uniform option gives each plot the same axis scales. Assuming a common x-variable, the overlay option (in the plot statement) will cause the plots to be displayed on the same graph. A legend is created for overlay plots if the legend=legendn option is included.

Multiple Plot Calls in a Plot Statement proc gplot data=save.padgett; plot totmass*plantht; /*now do more than one plot at a time*/ proc gplot data=save.padgett; plot totmass*plantht bllenavg*plantht; /*we get two different plot*/

PLOT and PLOT2 The PLOT2 statement allows for a second vertical axis to be displayed. Conditions: The x-variables in PLOT and PLOT2 must be the same. Differing vaxis specifications can be made for each.

PLOT and PLOT2 /*to get two different y-axes, try this…/* proc gplot data=save.padgett; plot lleaves*plantht; /*left*/ plot2 bllenavg*plantht;/*right*/ /*we get two plots on the same horizontal axis, but two different y-axes*/

Plots According to Third Variable Plots of the form y-variable*x-variable=z- variable produces a plot for each level of the z-variable. Overlaying of plots is automatic. A legend is produced automatically. This legend can be modified in a similar manner to that of legends in bar charts.

Plots According to Third Variable proc gplot data=save.padgett; plot totmass*plantht=marsh/legend=legend1; /*distinguishes the plotting points by marsh and produces a legend so we can tell which is which…*/ /* modify the legend as below… */ legend1 down=2 position=(top left inside) frame cborder=blue cframe=gray cshadow=red;

LEGEND Statement Options across=n —Legend is created with n entries per row. down=n —Legend is created with n entries per column Only one of ACROSS or DOWN should be specified.

LEGEND Statement Options position=(P1 P2 P3) —Legend is positioned based on parameters specified. Bottom, middle or top: Sets vertical position. Left, center or right: Sets horizontal position. Inside or outside: Places legend inside or outside the graph area. Default is (bottom center outside).

LEGEND Statement Options mode=reserve|protect|share —Controls how space is allocated to the plot and the legend. Reserve: Legend is allocated its own space in the output area. This is the default; however, it cannot be used for position= (inside). Protect: The legend is “protected” from the plot—it is drawn over the plot. This is the default when position= (inside). Share: Graphics are drawn over the legend if there is any intersection.

LEGEND Statement Options frame—Draws a frame around the legend in the first default color. cborder= —Draws a frame around the legend in the specified color. cframe= —Specifies the background color of the legend (or “fills” the frame). cshadow= —Places a shadow “behind” the legend in the specified color.

LEGEND Statement Options shape= —Controls appearance of the legend symbols. Specifications include: bar(width, height) line(length) symbol(width, height) label=(text-attributes ‘text’ ) —Defines the legend label text. value=(text-attributes-n ‘text-n’ ) —Defines the text associated with each legend symbol.

LEGEND Statement Options Text attribute options include: c= Text color. f= Text font. h= Text height. t= (value= option only) Legend entry to be modified. Must precede the attributes being changed for that entry. position= (label= option only) Positions legend label. Same options as legend position except for inside/outside (legend label is always inside).

Axis Modification As an option in the plot statement (after the / ) the user can specify haxis=axisn and/or vaxis=axisn to associate each axis with an axis statement. A plot2 statement may include a vaxis=axisn specification as well.

Axis Modification proc gplot data=save.projects; plot equipmnt*jobtotal/legend=legend1 haxis=axis1 vaxis=axis2; where stname in (‘NC’ ‘SC’ ‘VA’); legend1 down=2 position=(top left inside) frame cborder=blue cframe=gray cshadow=red; axis1 label=(“Equipment Cost” c=blue h=2 f=swissb) minor=none; axis2 label=(“Total Costs”);

The AXIS Statement Axis statement options include: c= (color=): Specifies the color of the axis lines, tick marks and text. width= Specifies the thickness of the axis line. order=(value list or start to stop by increment): Specifies the data values corresponding to the major tick marks. offset=(n1,n2): Specifies the space from the start of the axis to the first tick and the end of the axis from the last tick, respectively.

The AXIS Statement Axis statement options include: label=(text-options ‘text’) or NONE: Defines the axis label and its attributes. value=(text-options-n ‘text-n’) or NONE: Defines major tick labels and attributes. Can be done as a group or one at a time.

The AXIS Statement Attributes that can be specified within the label= and value= options: c= Text color. f= Text font. h= Text height. a= Angle of the text string. r= Rotation of individual characters. t= (value= option only) Tick mark to be modified. Must precede the attributes being changed for that tick.

Enhancing the Plot Area The SYMBOL statement: Modifies the plotting symbol and related items symboln options; n can range from 1 to 255. If n is omitted it is taken as 1 by default. SYMBOL statements are global—remain in effect until altered. They are applied across the current color list if no color is specified.

Some SYMBOL Statement Options v= (value=): Specifies the plotting symbol. f= (font=): Specifies the font from which the plotting symbol is selected. cv= Symbol color. h= (height=): Specifies the height of the symbol [in cells]. pointlabel places y-value near each point

Inheritance in SYMBOL Statements SYMBOL statements are global, some behaviors: Unmodified options will be inherited in subsequent definitions of a symbol statement. Modifications to a symbol statement (e.g. symbol2) does not alter symbol statements with other numbers. The statement goptions reset=symbol cancels all currently defined symbol statements.

Symbols Default symbol specifications and results:

Symbols Write 3 symbol statements to change the colors, shapes,sizes of the 3 plotting symbols for “NC”, “SC” and “VA” Go back to Padgett data and experiment with symbol statements

The GFONT Procedure You can view a SAS/GRAPH font using PROC GFONT. The typical syntax will be: proc gfont name=font nobuild showroman ctext=color ; run; This code will display the font symbols with their standard counterparts. Fonts can be found in the fonts catalog in the SAShelp library.

Plot Lines i= (interpol=): Specifies the interpolation method. Some of these include: join: Joins the points with line segments (“connect the dots”). sm##: Draws a smooth curve through the points, ## is a number that determines the level of smoothness (higher=smoother). needle: Draws vertical lines from the data to 0 (or the minimum value if all are greater than 0).

Plot Lines R > where: type is L, Q or C corresponding to linear, quadratic or cubic regression, respectively. 0 forces the regression through the origin. CLM and CLI specifies display of confidence limits for average (mean) predicted values and individual predictions. ## specifies the confidence level between 50 and 99.

Plot Lines The SYMBOL statement can be used to control plot lines: l= (line=): Specifies a line type (various types of dashed lines). Valid values go from 1 to 46. w= (width=): Specifies the line thickness. ci= Sets the line color. c= (color=): Sets colors for both lines and symbols.

Plot Lines Now try your hand at some of the interpolation methods - see if you can find the best smoothing for total mass against plantht by marsh in the Padgett data…