View markdown source on GitHub

Friends Don't Let Friends Make Bad Graphs

Contributors

Author(s) Chenxin Li avatar Chenxin Li
Editor(s) orcid logoHelena Rasche avatar Helena Rasche
last_modification Published: Nov 20, 2023
last_modification Last Updated: Nov 20, 2023

Friends Don’t Let Friends Make Bad Graphs

This is an opinionated essay about good and bad practices in data visualization.

This material is MIT licensed and adapted from cxli233/FriendsDontLetFriends.

R Code for generating the graphs is available in that repository.

Speaker Notes


1. Friends Don’t Let Friends Make Bar Plots for Means Separation

No Bar Plots for Means Separation

.footnote[inspired by many tweets the author saw on limitations of the bar graph. See e.g. Weissgerber et al. 2015]

Speaker Notes


2. Friends Don’t Let Friends Make Violin Plots for Small Sample Sizes

Beware of Violin Plots for Small Sample Sizes

Speaker Notes


3. Friends Don’t Let Friends Use Bidirectional Color Scales for Unidirectional Data

Are You Using the Right Color Scale for Your Data?

Speaker Notes


4. Friends Don’t Let Friends Make Bar Plot Meadow

Horrendous Giant Bar Plot vs. Better Designed Plot

.footnote[Data from Matand et al. 2020]

Speaker Notes


5. Friends Don’t Let Friends Make Heatmap without (Considering) Reordering Rows & Columns

A Heatmap before and after reordering rows and columns

.footnote[Data from Li et al. 2022]

Speaker Notes


Bonus: heatmaps can be very pretty

aRt with Heatmap

.footnote[ R Code, Tutorial on reordering ]

Speaker Notes

6. Friends Don’t Let Friends Make Heatmap without Checking Outliers

Did you check outliers

Speaker Notes


7. Friends Don’t Let Friends Forget to Check Data Range at Each Factor Level

Did you check data range at each factor level

Speaker Notes


8. Friends Don’t Let Friends Make Network Graphs without Trying Different Layouts

Try different network layouts

.footnote[Data from Li et al. 2022]

Speaker Notes


9. Friends Don’t Let Friends Confuse Position-based Visualizations with Length-based Visualizations

Position vs. length based visualizations

Speaker Notes


Watch out for bar plots with broken axis

Broken axis

.footnote[Example R Code]

Speaker Notes


10. Friends Don’t Let Friends Make Pie Chart

Don't make pie charts

Speaker Notes


11. Friends Don’t Let Friends Make Concentric Donuts

Don't make concentric donuts

Speaker Notes


12. Friends Don’t Let Friends Use Red/Green and Rainbow color scales

are you making a "safe" heatmap?

Speaker Notes


13. Friends Don’t Let Friends Forget to Reorder Stacked Bar Plot

Reorder your stacked bars

.footnote[Tutorial on optimising.]

Speaker Notes


Thank you!

This material is the result of a collaborative work. Thanks to the Galaxy Training Network and all the contributors! Galaxy Training Network Tutorial Content is licensed under MIT.

References

  1. Weissgerber, T. L., N. M. Milic, S. J. Winham, and V. D. Garovic, 2015 Beyond Bar and Line Graphs: Time for a New Data Presentation Paradigm. PLOS Biology 13: e1002128. 10.1371/journal.pbio.1002128
  2. Matand, K., M. Shoemake, and C. Li, 2020 High frequency in vitro regeneration of adventitious shoots in daylilies (Hemerocallis sp) stem tissue using thidiazuron. BMC Plant Biology 20: 10.1186/s12870-020-2243-7
  3. Li, C., J. C. Wood, A. H. Vu, J. P. Hamilton, C. E. Rodriguez Lopez et al., 2022 Single-cell multi-omics enabled discovery of alkaloid biosynthetic pathway genes in the medical plant Catharanthus roseus. 10.1101/2022.07.04.498697