Skip to contents

The ggdiagram package takes an object-oriented approach to making diagrams and plots the results using ggplot2.

This package is still experimental, and functions are likely to change in many ways. Every time I run into speed bumps or inconveniences as I use the program in practice, I adapt it to anticipate user needs.

My motivation in making ggdiagram was to find a way to approach the functionality of TikZ but with the flexibility and convenience of R. The ggdiagram package is built atop S7 and is integrated with ggplot2, making heavy use of ggtext, ggforce, and ggarrow.

The ggdiagram package is not a replacement for the standard ggplot2 functions. The underlying grammar of ggplot2 is well designed for visualizing data. The ggdiagram functions are best suited for creating a small number of visual objects that interrelate. If anything, they can be thought of as extensions of ggplot2::annotate.

Installation

You can install the development version of ggdiagram like so:

remotes::install_github("wjschne/ggdiagram")