Lecture 2 Visual processing and more advanced plots

  • Slides: 26
Download presentation
Lecture 2: Visual processing and more advanced plots Trevor A. Branch tbranch@uw. edu Beautiful

Lecture 2: Visual processing and more advanced plots Trevor A. Branch tbranch@uw. edu Beautiful graphics in R, FISH 554 SAFS, University of Washington

Rule 1 for graphics: always plot your data

Rule 1 for graphics: always plot your data

Matejka J & Fitzmaurice G (2017) Same stats, different graphs: generating datasets with varied

Matejka J & Fitzmaurice G (2017) Same stats, different graphs: generating datasets with varied appearance and identical statistics through simulated annealing. CHI 2017, May 6 -11. doi: http: //dx. doi. org/10. 1145/3025453. 3025912

Outline • • Using “par” Visual processing Horizontal barplots Sparklines

Outline • • Using “par” Visual processing Horizontal barplots Sparklines

Handout: explanation of par

Handout: explanation of par

Image: National Eye Institute, National Institutes of Health

Image: National Eye Institute, National Institutes of Health

https: //xkcd. com/1080/

https: //xkcd. com/1080/

Blind spot experiment

Blind spot experiment

Fovea and concentration Visual acuity and the concentration of cones (photoreceptors) in the fovea

Fovea and concentration Visual acuity and the concentration of cones (photoreceptors) in the fovea are related to performance in counting tasks Few (2009) Chapter 3

Video

Video

How do size perceptions depend on plot type? Test 1 Test 7 Test 2

How do size perceptions depend on plot type? Test 1 Test 7 Test 2 Test 3 Test 9 Test 8 Heer & Bostock 2010 Crowdsourcing graphical perception: using Mechanical Turk to assess visualization design. pp 203 -212 in CHI '10 Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, Atlanta, Georgia, USA, April 10 -15, 2010

Using Amazon’s Mechanical Turk Heer & Bostock 2010 Crowdsourcing graphical perception: using Mechanical Turk

Using Amazon’s Mechanical Turk Heer & Bostock 2010 Crowdsourcing graphical perception: using Mechanical Turk to assess visualization design. pp 203 -212 in CHI '10 Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, Atlanta, Georgia, USA, April 10 -15, 2010

Source: http: //xkcd. com/369/

Source: http: //xkcd. com/369/

Marshawn Lynch, Seahawks “beast mode” 8 Jan 2011 https: //www. youtube. com/watch? v=r 18

Marshawn Lynch, Seahawks “beast mode” 8 Jan 2011 https: //www. youtube. com/watch? v=r 18 l. HPDMNFE

http: //www. pnsn. org/blog/2011/12/31/one-year-ago-seattle-seahawks-12 th-man-earthquake

http: //www. pnsn. org/blog/2011/12/31/one-year-ago-seattle-seahawks-12 th-man-earthquake

Catch at each trophic level Year Branch et al. (2010) Nature 468: 431 -435

Catch at each trophic level Year Branch et al. (2010) Nature 468: 431 -435

Source: http: //xkcd. com/369/

Source: http: //xkcd. com/369/

Exercise 1: recreate this plot For everyone: try to produce this barplot with labels

Exercise 1: recreate this plot For everyone: try to produce this barplot with labels using the data in file “Accidents. csv” Source: http: //xkcd. com/369/

Challenge Exercise 1: for those truly trying to replicate the xkcd cartoon, here are

Challenge Exercise 1: for those truly trying to replicate the xkcd cartoon, here are some tips 1. Use text() to place the numbers 2. text(1, 1, labels="1n 2n 3") adds a carriage return for every n 3. Humor sans font reproduces xkcd feel

Exercise 2: West Coast catches using sparklines Try to produce this plot using the

Exercise 2: West Coast catches using sparklines Try to produce this plot using the data in “WCcatches. csv”

Challenge exercise 3: Academic salaries Try to produce this plot using the data in

Challenge exercise 3: Academic salaries Try to produce this plot using the data in “Univ. Salaries. csv”

Challenge exercise 4 Create this plot that illustrates the differences between the different R

Challenge exercise 4 Create this plot that illustrates the differences between the different R options for line widths, line types, and point types Point characters (pch) Line width (lwd) Line type (lty)