42  Posters and research day

A poster is read from a metre away, not held at arm’s length. Text that looks generous on a manuscript page disappears on a poster panel. The fix is a larger base size so axis labels, titles, and any on-panel series labels scale up together, plus a panel content area sized to the physical poster layout rather than a screen. theme_hv_poster() handles the typography; hv_ggsave_dims() pins the data region to the dimensions you reserve on the poster.

Like the other house themes, theme_hv_poster() sets legend.position = "none", so a poster figure names its groups on the panel rather than in a key. At poster scale that is not just convention: a reader standing a metre back cannot hold a margin key in mind while tracking a curve. Section 37.4 has the recipe.

42.1 A poster-styled plot

theme_hv_poster() uses a 16 pt base, and every text element scales from it, so a single argument controls overall legibility.

p        <- plot(hv_survival(sample_survival_data(n = 500, seed = 42)))
p_poster <- p + theme_hv_poster()
p_poster

For an even larger viewing distance, bump the base: theme_hv_poster(base_size = 24) enlarges the whole text hierarchy proportionally.

42.2 Poster PDF

Poster figures are bigger than manuscript figures and usually slot into a fixed panel of the poster template. As with manuscripts, fix the panel content area rather than the file size: hv_ggsave_dims() returns width/height/units so the data region matches the rectangle you allotted on the poster, expanding the file to fit the (now larger) axis text and on-panel labels.

dims <- hv_ggsave_dims(p_poster, width = 12, height = 9, units = "in")

do.call(
  ggsave,
  c(
    list(filename = "trends_poster.pdf", plot = p_poster,
         device = grDevices::quartz, type = "pdf"),
    dims
  )
)

The chunk is eval: false because it writes a binary PDF. The code is shown, not executed during the book build.

The device is worth a word, because the obvious choice fails quietly. cairo_pdf is the usual recommendation for embedding fonts, and on a Mac without XQuartz it warns “failed to load cairo DLL”, returns without error, and writes no file at all. Measured on this machine: ggsave() reported success and the target PDF did not exist. The quartz device is part of macOS, needs nothing installed, embeds fonts, and handles the full Unicode range, which is why this book’s own PDF build uses it. The cost is that it is macOS only, so a poster built on Linux needs cairo_pdf and a working cairo.

Calling hv_ggsave_dims() with the same width/height for every figure on the poster keeps the data regions aligned across panels, regardless of how much room each plot’s labels consume.