Skip to contents

This vignette outlines the design decisions that have been taken during the development of the tracetheme R package, and provides some of the reasoning, and possible pros and cons of each decision.

This document is primarily intended to be read by those interested in understanding the code within the package and for potential package contributors.

Scope

The package provides one theme function, named trace_theme(), to match the name of the existing theme functions provided out of the box by ggplot2.

Input/Output/Interoperability

This package should work with plots provided by:

  • ggplot2
  • ggraph

Design decisions

Alignment with Epiverse-TRACE web theme

Epiverse-TRACE already has a clear visual identity for its web resources, via the pkgdown custom theme, the varnish fork to customize the look of online training materials, and the custom theme for the quarto website.

The custom ggplot2 theme and scale provided here should roughly align with this existing visual identity.

In practice, this means:

Accessibility requirements

The package should aim to be accessible to all users, including those with visual impairments. As such:

  • The default font size and weight, and the default line thickness, should be have reasonably high values
  • The default colour scale should be accessible for colourblind users, and for non-colour printing.

Dependencies

The only hard dependency of this package should be ggplot2.

We anticipate using other dependencies during the development of this package, such as the colorspace package. But these development packages don’t need to be added to the DESCRIPTION file.