plot_heatmap: Plot heatmap of raw data

View source: R/plot_heatmap.R

plot_heatmapR Documentation

Plot heatmap of raw data

Description

Plots a heatmap of raw data.

Usage

plot_heatmap(
  data = NULL,
  trial_number = NULL,
  bg_image = NULL,
  res = c(0, 1920, 0, 1080),
  flip_y = FALSE,
  alpha_control = 0.1,
  plot_header = FALSE
)

Arguments

data

data in standard raw data form (time, x, y, trial)

trial_number

can be used to select particular trials within the data

bg_image

The filepath of an image to be added to the plot, for example to show a screenshot of the task.

res

resolution of the display to be shown, as a vector (xmin, xmax, ymin, ymax)

flip_y

reverse the y axis coordinates (useful if origin is top of the screen)

alpha_control

a single value to determine how much of the heatmap to obscure. Between 0 and 1. Lower values include more data in the heatmap

plot_header

display the header title text which explains graphical features of the plot.

Value

a plot of the raw data

Examples


data <- combine_eyes(HCL)
data <- data[data$pNum == 118,]
# plot all trials data
plot_heatmap(data, alpha_control = .01)

#plot one trial
plot_heatmap(data, trial_number = 1)



tombeesley/eyetools documentation built on Dec. 23, 2024, 12:36 a.m.