Academic Figures: A Comprehensive Guide
Common Pitfalls and Best Practices
Welcome
This comprehensive guide covers common pitfalls and best practices for creating academic figures, with a focus on R and ggplot2.
This material was originally created as a presentation, so some sections may be more concise or visually oriented than typical book chapters. The book format adds context, exercises, and additional explanations, but the core content prioritizes visual examples and practical demonstrations.
About This Guide
Scientific figures are often the first—and sometimes the only—thing readers look at in a paper. Poor quality figures not only look unprofessional but can also mislead readers and undermine your research. This guide will help you create clear, accurate, and publication-ready figures.
What You’ll Learn
This guide covers 11 essential topics:
Core Principles:
- Color Gradients - Why rainbow scales are problematic and what to use instead
- Heatmap Scaling - Handling outliers and choosing appropriate scaling methods
- File Formats - Vector vs raster, when to use PDF, SVG, PNG, or TIFF
Practical Workflow:
- Text Sizing - Making text readable at final dimensions
- Themes & Styling - Setting consistent, publication-ready styles
- Saving Plots - Using ggsave() properly with correct DPI and dimensions
- Post-Processing - When and how to edit exported figures
Advanced Topics:
- PowerPoint Import - Importing figures without quality loss
- Factor Ordering - Avoiding common sorting pitfalls
- Interactive Plots - Creating interactive visualizations with plotly
- Rendering Issues - Troubleshooting common problems
Three Ways to Learn
This material is available in multiple formats to suit different learning styles:
📊 Presentation Slides
Concise, visual presentation format perfect for:
- Quick reference during analysis
- Presentations and workshops
- Getting an overview of key concepts
📖 Book Format (You’re Here!)
Comprehensive tutorial with the same content plus:
- Detailed introductions and learning objectives
- Summaries and key takeaways
- Hands-on exercises
- Further reading resources
Note: This book uses a single-source architecture. The same source files (topics/*.qmd) generate both the slides and book chapters, ensuring perfect consistency between formats.
✅ Interactive Quiz (Local Only)
Test your knowledge with 31 questions covering all topics! The quiz runs as an interactive R Shiny app, so it only works locally (not on the web). See the Quiz Information appendix for instructions.
Who This Guide Is For
- Researchers preparing figures for publication
- Graduate students learning data visualization
- Anyone who creates plots in R
- Workshop participants and instructors
Prerequisites
Basic familiarity with:
- R programming
- ggplot2 plotting
- Data manipulation with dplyr/tidyr
Getting Started
Navigate using the sidebar on the left, or start with Chapter 1: Color Gradients. Each chapter is self-contained with code examples you can run yourself.