plot_heatmap: Plot heatmap using ggplot2

View source: R/heatmap.R

plot_heatmapR Documentation

Plot heatmap using ggplot2

Description

Create a quick heatmap visualisation of character activity by story chunks using ggplot2.

Usage

plot_heatmap(input_heatmap, cutoff = 0, title = "")

Arguments

input_heatmap

The character-by-chunk heatmap matrix produced by the activity_heatmap function.

cutoff

A numeric value to be used to filter the visualisation to only include those characters who speak more than cutoff number of lines.

title

An optional character string which can be used to add a title to the visualisation.

Value

A ggplot2 plot.

Examples

tfa <- movienetdata::starwars_tfa
activity_heatmap(tfa$event_list,
              char_names = tfa$node_list$char_name,
              n_chunks = 4) %>%
  plot_heatmap(cutoff = 3)


pj398/charinet documentation built on May 2, 2024, 10:28 p.m.