trial_plots: This function draws original and modified fixations with...

View source: R/adjust_y.R

trial_plotsR Documentation

This function draws original and modified fixations with fitted lines

Description

This function is suitable for values optimized by cat_line functions; it can also draw results of hand-made categorization of fixations

Usage

trial_plots(data, start_pts, output_filehead, draw_type, bg_image_name = NULL,
  image_width = 1280, image_height = 1024)

Arguments

data

A data.frame containing fixations and optimized information generated by different cut_line functions

start_pts

A data.frame containing the starting position of each text line. It has three columns:

  1. x_pos: x position of the first word in each text line.

  2. y_pos: y position of the first word in each text line.

  3. trial_num: the trial number of the current start_pts

output_filehead

A string as the output figure file head, the remaining name is determined by draw_type, the output figure file is a png file

draw_type

A string indicating the way of drawing. It can have the following three options:

  1. 'hand': hand-made fixation lines, output file ends with '_hand'

  2. 'original': original fixation lines, output file ends with '_ori'

  3. 'modified': residule fixation lines, output file ends with '_mod'

bg_image_name

Name of the background trial figure file (*.png); such file is optional, if no such file, the figure has a white background

image_width

Integer indicating the width of image drawn; default value is 1280

image_height

Integer indicating the height of the image drawn; default value is 1024

Details

This function first draws the background text file, and then, draws different types of fixations categorized by hands or cat_line functions onto it And finally, it saves the plot.

Value

None. A plot is automatically generated and stored.

Author(s)

Tao Gong gtojty@gmail.com


davebraze/FDBeye documentation built on April 28, 2022, 1:20 a.m.