Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 1 Module 5 Box, Dot, Histogram, Strip Charts Do See & HearRead Learn.

Slides:



Advertisements
Similar presentations
1 Statistics 202: Statistical Aspects of Data Mining Professor David Mease Tuesday, Thursday 9:00-10:15 AM Terman 156 Lecture 5 = More of chapter 3 Agenda:
Advertisements

SADC Course in Statistics Good graphs & charts using Excel Module B2 Sessions 6 & 7.
Summary Statistics/Simple Graphs in SAS/EXCEL/JMP.
R Language. What is R? Variables in R Summary of data Box plot Histogram Using Help in R.
Lesson 15 Presentation Programs.
Lecture (4) Plotting & Programming (1) Eng. Osama Talaat 1.
Introduction to R Graphics
Graphics in R data analysis and visualization Katia Oleinik Scientific Computing and Visualization Boston University
Microsoft Word 2013 An Overview. Your Environment Quick Access Toolbar Customizable toolbar for one-click shortcuts Tabs Backstage View Tools located.
Exemples instructifs… Représentations graphiques.
Microsoft Office 2003 Illustrated Brief Elements to a Document Adding Special.
1 After completing this lesson, you will be able to: Add a header and footer to a worksheet. Change margins and center a worksheet. Change the orientation.
Copyright 2003, Paradigm Publishing Inc. CHAPTER 5 BACKNEXTEND 5-1 LINKS TO OBJECTIVES AutoForm Form Wizard Fields From Related Database Tables Fields.
Part 2 Lesson 2 Review. true 1. Creating well formatted documents is important because a document’s formatting is the first thing the reader will note.
Descriptive Statistics Summarizing data using graphs.
Customizing Graphs Base graphics options. plot() The workhorse plotting function plot(x) plots values of x in sequence or a barplot plot(x, y) produces.
Evan Girvetz Winkenwerder Introduction to Graphics in R © R Foundation, from
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
In this tutorial you will learn how to go from THIS.
1 Good graphs & charts using Excel Module 1 Session 7.
How To Make Graphs in Microsoft Excel Outline Making Bar Graphs Making Scatter Plots – 1 series Making Scatter Plots – Multiple Series.
Creating a Bar Chart On a Mac. Frequency Distribution Create a frequency distribution based on the classes Refer to creating a frequency distribution.
Creating a Bar Chart. Create a frequency distribution based on the classes.
Baburao Kamble (Ph.D) University of Nebraska-Lincoln Data Analysis Using R Week5: Charts/Plots in R.
Using Excel To help with data. Excel is a spreadsheet program that can interface with Word, or PowerPoint A spreadsheet program has cells (little blocks)
R-Graphics Day 2 Stephen Opiyo. Basic Graphs One of the main reasons data analysts turn to R is for its strong graphic capabilities. R generates publication-ready.
Creating your own form from scratch.. To create a custom form, you can modify an existing form or design and create a form from scratch. In either case,
The introduction to SPSS Ⅱ.Tables and Graphs for one variable ---Descriptive Statistics & Graphs.
An Introduction to R graphics Cody Chiuzan Division of Biostatistics and Epidemiology Computing for Research I, 2012.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. M I C R O S O F T ® Creating Charts Lesson 6.
1 Word Lesson 3 Formatting Documents Microsoft Office 2010 Fundamentals Story / Walls.
Basic Editing Lesson 2.
Getting Started with TI-Interactive. TI-Interactive TI-Interactive can be used to create a variety of graphs. Scatter Plots, Line Plots, Histograms, Modified.
Plot Using Excel. Select Data Insert →Charts →Scatter.
Section 2.2 Bar Graphs, Circle Graphs, and Time-Series Graphs 2.2 / 1.
Descriptive Statistics Summarizing data using graphs.
BOX PLOTS (BOX AND WHISKERS). Boxplot A graph of a set of data obtained by drawing a horizontal line from the minimum to maximum values with quartiles.
Using Google Sheets To help with data. Sheets is a spreadsheet program that can interface with Docs, or Slides A spreadsheet program has cells (little.
Section 2.2b Graphical Displays of Distributions.
R-Graphics Stephen Opiyo. Basic Graphs One of the main reasons data analysts turn to R is for its strong graphic capabilities. R generates publication-ready.
PowerPoint 2007 Basics Review and Practice File. Insert a Shape 1.Insert any shape 2.Change the shape’s color 3.Change the shape’s style and add a bevel.
R (3) Introduction to Graphics. The main guide R in Action Data Analysis and Graphics with R Robert I. Kabacoff
Making Bar Graphs and Scatter Plots in Microsoft Excel 2007.
Chapter 5: Boxplots  Objective: To find the five-number summaries of data and create and analyze boxplots CHS Statistics.
Plotting Complex Figures Using R
Conduct Simple Correlations Section 7. Correlation –A Pearson correlation analyzes relationships between parametric, linear (interval or ratio which are.
MATH 2311 Section 1.5. Graphs and Describing Distributions Lets start with an example: Height measurements for a group of people were taken. The results.
Learn R Toolkit D Kelly O'DayInstall & SetupMod 1 - Setup: 1 Module 1 Installing & Setting Up R Do See & HearRead Learn PowerPoint must be in View Show.
Microsoft PowerPoint 2010 for Microsoft Windows Basically it’s a computerised slide show!
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
DATA ABOUT US DAY 4 Line Plots and Bar Graphs continued.
Graphs Class A Class B. Pictograph Types of Graphs Line Graphs Plots Circle Graph Histogram Single Double Stem & Leaf Line Single Double Box - and - Whisker.
Word 2010 Edit Page Layout In this lesson, you will learn how to insert columns and page breaks. How to change the page orientation, paper size, page margins,
Microsoft Excel 2007 Noris Bt. Ismail Faculty of Information and Communication Technology Tel : (Ext 8408) BCOMP0101.
Introduction to plotting data Fish 552: Lecture 4.
By Christy Quattrone Click to View Types of Graphs Data Analysis, Grade 5.
Add More Zing to your Dashboards – Creating Zing Plot Gadgets
Descriptive Statistics
Statistical Reasoning
Data Analysis Module: Basic Visualizations
How to Create Tables & Charts/Graphs in Excel
DS2 – Displaying and Interpreting Single Data Sets
2.6: Boxplots CHS Statistics
Recoding II: Numerical & Graphical Descriptives
INTRODUCTION TO SGPLOT Zahir Raihan OVERVIEW  ODS Graphics  SGPLOT overview  Plot Content  High value plot statements  High value plot options 
Advanced Plotting Techniques
How to Create Tables & Graphs in Excel
Essentials of Statistics for Business and Economics (8e)
How to Create Tables & Graphs in Excel
Microsoft PowerPoint Tutorial Graphs BIS 101 Spring 2018.
Presentation transcript:

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 1 Module 5 Box, Dot, Histogram, Strip Charts Do See & HearRead Learn PowerPoint must be in View Show Mode to See videos and hyperlinks

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 2 Module 5 Box, Dot, Histogram, Strip Charts Do See & HearRead Learn

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 3 Making Box, Dot, Histogram, Strip Charts Click video image to start video

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 4 Overview of R Charting High Level Plot Functions Arguments Menu TypeR function() Bar Chartbarplot() Box & Whisker Plotboxplot() Dot Plotdotchartt() Histogramhist() Scatter Plotplot() Strip Chartstripchart() High Level Function Arguments type= type = “p” – individual points type = “l” – line type = “b” – points connected with lines type = “h” – vertical lines from 0 type = “s” – step chart xlab = “ “ ylab = “ “ X and Y axis titles main = “ “ sub = “ “ Figure title top of plot, large font Sub title – below X axis, smaller font axes = Tor FSet to F when you want custom axis Produce complete chart

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 5 Module 5 Box, Dot, Histogram, Strip Charts Menu Box Plot Dot Plot Histogram Strip Chart

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 6 Making a Box & Whisker Plot with boxplot() Function Menu boxplot(Sepal.W ~ Species, data = my_data, col = "grey", horizontal = FALSE, par(cex = 0.7),whisklty=1, outline = TRUE, boxcol = "grey", boxwex = 0.5, border = "darkgrey", pch = 16, outcol = "red", main = Title) "Sepal.L","Sepal.W","Petal.L","Petal.W","Species" 5.1,3.5,1.4,0.2,"setosa“ 4.9,3,1.4,0.2,"setosa“ 4.7,3.2,1.3,0.2,"setosa“ 4.6,3.1,1.5,0.2,"setosa“ 5,3.6,1.4,0.2,"setosa“ 5.4,3.9,1.7,0.4,"setosa" boxplot() boxplot(?? ~ ??, data = ??, col = “??", horizontal = ??, par(cex = 0.??),whisklty=??, outline = ??, boxcol = “??", boxwex = ??, border = “??", pch = ??, outcol = “??, main = ??) Data File: C:\\Learn_R\\Mod_4_R_Charts\\iris_data.txt R’s Iris flower data set copied to text file

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 7 Box plot with All Points boxplot(Sepal.L ~ Species, data = my_data, col = "blue", horizontal = FALSE, par(cex = 0.65),whisklty=1, outline = TRUE, boxfill = "grey", boxwex = 0.5, border = "darkgrey", pch = 16, outcex = 1.25, outcol = "red", main = Title) points(my_data$Sepal.L~my_data$Species, pch=16, col="red") R lets you add low level graphics to a plot Show all points on box plot

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 8 Assignment 5-1 Make a Box plot Menu Make your own box plot like this Notice horizontal orientation, line style and blue color #################### Box_plot_assign.R ################### ##Script to produce assignment box plot ## STEP 1: SETUP & Source File rm(list=ls()) oldpar<- par(no.readonly=T) par(las=1); par(oma=c(2,4,0,2)); par(mar=c(3,3,3,1)) script <- "C:/Learn_R/Mod_5_box_dot_hist_charts/Practice_5_1_Bo link <- "C:\\Learn_R\\Mod_5_Box_Dot_Hist_Charts\\iris_data.txt" ## STEP 2: READ DATA my_data <- read.table(link, sep = ",", dec=".", skip = 0, row.names = NULL, header = TRUE, colClasses = c(rep("numeric", 4), "factor"), na.strings = c("", "*", "-", ,99.9, 999.9)) ## STEP 3: MANIPULATE DATA Title <- "Iris Flower Data Set: Petal Length" ## STEP 4: CREATE PLOT boxplot(Petal.L ~ Species, data = my_data, col = "blue", horizontal = TRUE, cex = 0.65,whisklty=5, outline = TRUE, boxcol = "grey", boxwex = 0.5, border = "darkgrey", pch = 16, outcex = 1., outcol = "red", main = Title) ## Outer margin annotation my_date <- format(Sys.time(), "%m/%d/%y") mtext(script, side = 1, line =.5, cex=0.7, outer = T, adj = 0) mtext(my_date, side = 1, line =.5, cex = 0.7, outer = T, adj = 1) ## STEP 5: CLOSE par(oldpar)

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 9 Making a Dot Plot with dotchart() Function Dot plots developed by William Cleveland Alternative to bar charts X axis displays measurement Y axis displays categorical label Menu Dotchart() dotchart(??, labels = ??, groups = ??, main = “??", xlab = "??", pch = ??, col = "??", lcolor = ??, gcolor = ??) Data File:C:\Learn_R\Mod_5_Box_Dot_Hist_Charts\dot_plot_data.txt

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 10 Dot Plot Scripts Simple & Grouped dotchart(Quad_BTU, labels = Fuel, main = Title, xlab = "Quadrillion BTU", pch = 16, col = "blue", lcolor = NULL) text(5,0.5, cex=0.65, pos=4, Source) dotchart(Quad_BTU, labels = Fuel, groups = Type, main = Title, xlab = "Quadrillion BTU", pch = 16, col = "blue", lcolor = NULL, gcolor = “red“ ) text(5,0.5, cex=0.65, pos=4, Source) Simple Dot Plot Grouped Dot Plot Menu

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 11 Assignment 5-2 Dot Plot Start with script C:/Learn_R/Mod_5_Box_Dot_Hist_Charts/Dot_plot_Simple_example.R Make your own dot plot like this Use dot_plot_data.txt for source data Notice Y axis grid lines with grey color Menu dotchart(Quad_BTU, labels = Fuel, main = Title, cex = 0.7, xlab = "Quadrillion BTU", pch = 16, col = "blue", lcolor = NULL) text(5,0.5, cex=0.65, pos=4, Source) grid(nx=0, ny=10,col = "grey")

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 12 Making a Histogram with hist() Function Menu hist(my_scores, freq = T, breaks = 10,border="black", labels=T, xlim = c(8, 20), ylim = c(0,12), col = "darkgrey", xlab = "Exam Score", ylab= "Number of Students",cex.main=t_par, main = "Histogram of Exam Results: \n Score out of possible 20 points") axis(1, at=seq(8, 20, 1))

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 13 Making a Histogram with hist() Function Enhancing a histogram: –Histogram w/ counts –Distribution –Median line –Counts <> Median –Summary Stats in Note Menu

Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 14 Making a Strip Chart with stripchart() Function stripchart(Sepal.L ~ Species, data = my_data, col = "grey", main = Title, font.main=2, vertical = T, pch = 16, font.axis = 1,cex=1., cex.main = 1.2, cex.axis = 1.1)