Skip to content

Creating nice figures

n-kall edited this page Aug 28, 2023 · 12 revisions

R

  • Use ggplot2
  • Colour schemes: RColorBrewer or viridisLite
    • Paul Tol has also done a lot of work on colour-blind friendly schema, available in khroma
  • Use patchwork to join ggplot objects together
  • Use geomtextpath to create curved text in ggplot2
  • Use tikzDevice to save a ggplot object as .tex file, then use \input{} in latex to read in the figure at the appropriate place
  • RStudio: Tools -> Global Options -> Sweave -> LaTeX Editing and Compilation -> Use tinytex when compiling .tex files.
  • Use geom_function() for plotting analytical distributions
  • ggplot2 tricks: https://github.com/teunbrand/ggplot_tricks#readme
  • direct labelling: directlabels package
  • misc improvements to ggplot2: lemon cowplot

Python

LaTeX

Aalto "Visual Design Guidelines"