Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa...

27
Rutgers University - Center for Vector Biology Graphing Data: Have Graphing Data: Have I Got a Story to I Got a Story to Tell… Tell… Lisa Reed, Ph.D Lisa Reed, Ph.D Center for Vector Biology Center for Vector Biology Rutgers University Rutgers University 26 April 2012 26 April 2012

Transcript of Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa...

Page 1: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Graphing Data: Have I Got Graphing Data: Have I Got a Story to Tell…a Story to Tell…

Lisa Reed, Ph.DLisa Reed, Ph.DCenter for Vector BiologyCenter for Vector Biology

Rutgers UniversityRutgers University26 April 201226 April 2012

Page 2: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

For Today

• Graph Importance• Examples, both good and

bad• What are good graphs and

good graph rules• How do you make a good

graph– Excel graph designs– Others

• How to get them from Excel to Word

Page 3: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

“The greatest value of a picture is when it forces

us to notice what we never expected to see.”

Tukey, 1977, Exploratory Data Analysis

Page 4: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Why Are Graphs Important?

• Can give information quickly

• Can highlight the point you want to make

• Can direct towards statistical tools

• But can give misinformation if not careful

Page 5: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Napoleon’s March to and From Moscow by Minard

• Shows number of troops in geography and travel• Shows temperature and time• Gives an understanding for Napoleon’s failure

Page 6: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Snow’s Cholera Well

• Identifies cholera deaths (in red)

• Identifies wells (in blue)

• Implicates cholera as a water-borne disease

• Clearly indicates which well should be shut down.

Page 7: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Simple Statistical Graphs

Page 8: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Not so good.

From junkcharts.typepad.com

Page 9: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

What Makes A Good Graph?

• Simple and efficient: Presents one basic conclusion.• Clear and Unambiguous: You understand what is being

presented.• Not Misleading: You don’t come to a wrong conclusion.• Meaningful: You come to a correct and relevant

conclusion.

Page 10: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Achieving Good Graphics

• Use Titles – What are you trying to show?• Use Axis Labels – Tell what you are graphing.• Use Units of Measurements – Tell what you are

graphing.• Use legends.• Use Series coloration/fills – but be careful for those

who are colorblind.• Keep scaling appropriate.• Write out equations when appropriate.• Use error bars when available.

Page 11: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Use Titles, Labels, Units of Measure, Legends

Page 12: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Fills & Colorblindness

• Patterns (but must load patterns if using Excel 2007)

• Labels• 1 Color and Brightness• Grayscale

http://www.colblindor.com/2007/06/02/how-to-color-charts-respecting-color-blindness/

Page 13: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

You can run a colorblind checker…

• http://www.vischeck.com/vischeck/vischeckImage.php

• Browse to your image and run the checker.

Page 14: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Scale

• Generally begin at zero.

• But look at data.• If more than 1 graph

on a page, try to use same scale.

• If you cannot use one scale, make it obvious that the scales differ.– Different colors– Different gridlines

Page 15: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Equations and Error Bars

• Both elements give added information.

• But need specific information– Regression lines need

the equation AND the R2

– Error bars need the type.

Page 16: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Making Graphs in Excel

• Highlight Data• Choose Graph Style…• Voila!

Page 17: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Editing Graphs in Excel

Page 18: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Changing Chart Types

Page 19: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Switch Row/Column

Page 20: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Adding Titles, Labels and Legends

Hold Down the Alt key and type from the keypad numbers:Alt 241 = ±Alt 248 = °

Page 21: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

No Fills Available for versions 2007!

• But, download add-in– http://officeblogs.ne

t/excel/PatternUI.zip

• Unzip file (and remember where it is)

• Go to Window Flower, Excel Options, Add-in, Go and click Patternui.

• Click on series in graph, go to Chart Tools, Format, Patterns and select which one you want.

Page 22: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Scale

• Generally begin at zero.

• But look at data.• If more than 1 graph

on a page, try to use same scale.

• If you cannot use one scale, make it obvious that the scales differ.– Different colors– Different gridlines

Page 23: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Equations

Page 24: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

The Agony and the Ecstasy of Error Bars

• You have a set of data.• You do a pivot table to summarize average and SD.• You plot average with the intention of doing SD as

error bars:

• You have a set of data.• You do a pivot table to

summarize average and SD.

• You copy and paste values, THEN create your graph:

X

Page 25: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Achieving Good Graphics

• Use Titles • Use Axis Labels • Use Units of Measurements• Use legends.• Use series coloration/fills.• Keep scaling appropriate.• Write out equations when appropriate.• Use error bars when available.

Page 26: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Why this Class?

• Resistance Classes

• Graphs

• Simple Statistics

• Probit Analysis

Page 27: Rutgers University - Center for Vector Biology Graphing Data: Have I Got a Story to Tell… Lisa Reed, Ph.D Center for Vector Biology Rutgers University.

Rutgers University - Center for Vector Biology

Suggested References

• The Visual Display of Quantitative Information – Edward Tufte, 1983

• How to Lie with Statistics – Darrell Huff, 1994