Publication-Ready Figure Generation in R
Welcome to the course website for Publication-Ready Figure Generation in R.
License
This project is licensed under the MIT License.
Copyright
Copyright 2025, Deepak Tanwar
Learning Objectives
- Analyze the principles of effective data visualization:
- Explain the importance of clarity, accuracy, and aesthetics in creating publication-ready figures.
- Identify common pitfalls in data visualization and how to avoid them.
- Apply base R graphics for figure creation:
- Create basic plots (e.g., scatterplots, bar charts, histograms) using base R functions like
plot(),barplot(), andhist(). - Customize plots with titles, labels, legends, and color schemes.
- Create basic plots (e.g., scatterplots, bar charts, histograms) using base R functions like
- Construct advanced visualizations using ggplot2:
- Build complex and layered visualizations using the
ggplot2package. - Apply themes, scales, and
geomsto create polished and publication-ready figures.
- Build complex and layered visualizations using the
- Adapt figures for specific publication requirements:
- Adjust figure dimensions, resolutions, and formats (e.g., PDF, PNG, TIFF) for journal submissions.
- Modify fonts, line weights, and other stylistic elements to meet publication guidelines.
- Integrate statistical annotations and summaries:
- Add statistical summaries (e.g., regression lines, confidence intervals) to figures.
- Annotate plots with p-values, correlation coefficients, or other relevant statistics.
- Generate high-quality figures:
- Use functions like
ggsave()orpdf()to export figures in high resolution. - Ensure exported figures meet the technical requirements of target journals or platforms.
- Use functions like
- Assemble multi-panel figures:
- Combine multiple plots into a single figure using tools like
patchwork. - Align and arrange subplots to effectively communicate complex data.
- Combine multiple plots into a single figure using tools like
- Implement best practices for reproducibility:
- Write clean and reusable R scripts for figure generation.
- Document code and workflows to ensure reproducibility and transparency.
Learning experiences
To reach the learning outcomes we will use lectures, exercises, and polls. During exercises, you are free to discuss with other participants. During lectures, focus on the lecture only.
Exercises
Each block has practical work involved. Some more than others. The practicals are subdivided into chapters, and we’ll have a (short) discussion after each chapter. All answers to the practicals are incorporated, but they are hidden. Do the exercise first by yourself, before checking out the answer. If your answer is different from the answer in the practicals, try to figure out why they are different.